Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

openrouter-hello-world

Skill by jeremylongshore

Walks you through your first OpenRouter API request and explains the response. It is for developers who are learning OpenRouter, checking their setup, or confirming that connectivity works.

  • Score 75
  • 3k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install openrouter-hello-world

Built from the published package, never by AI.

git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.claude/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/openrouter-hello-world ~/.claude/skills/openrouter-hello-world

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install openrouter-hello-world in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill shows how to send a minimal chat completion request to the OpenRouter endpoint at POST https://openrouter.ai/api/v1/chat/completions. It includes a cURL command, Python and TypeScript examples using the OpenAI SDK, and a guide to the response fields: id, model, usage, and finish_reason. It also covers swapping model IDs to test multi-model access with the same code.

The skill also shows how to query the generation endpoint for token counts and cost on a request. It includes a table of common HTTP errors (401, 402, 404, 400) with fixes. It is aimed at developers who are new to OpenRouter or who want to verify that their API key and network access work before building further.

Written from the project's SKILL.md and checked against it.

What it can do

  • Minimal cURL requestSends a single chat completion request to OpenRouter from the command line.
  • Response format guideExplains the id, model, usage, and finish_reason fields in a completion response.
  • Python exampleShows the same request using the OpenAI Python SDK with OpenRouter as the base URL.
  • TypeScript exampleShows the same request using the OpenAI Node SDK with OpenRouter as the base URL.
  • Try different modelsShows how to swap model IDs, including a free model and an auto-router.
  • Check generation costQueries the generation endpoint for token counts and total cost of a request.
  • Error handling referenceLists HTTP 401, 402, 404, and 400 errors with their likely causes and fixes.

What you need

  • OpenRouter API key starting with sk-or-v1-
  • curl and jq, or Python 3.8+ with the openai package
  • Node.js 18+ with the openai package for the TypeScript example

Try asking

  • Send my first OpenRouter request and show me the response fields
  • Test my OpenRouter setup with a simple hello world request
  • Show me how to check the cost of an OpenRouter generation by its id

Good to know

  • Paid models need credits; the skill uses :free models for its examples.
  • Setup of the API key is covered by a separate openrouter-install-auth skill.

Security check

B
  • Allowed to use Write, Edit without limitsIn SKILL.md

Checked automatically: skills/.curated/openrouter-hello-world/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: ReadWriteEditGrepBash(curl:*)Bash(python3:*)Bash(node:*)Bash(jq:*)

Alternatives to openrouter-hello-world

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

openrouter-hello-world: common questions

Do I need to pay to try this?

The source says every step works with :free models and no credits are required for them. Paid models return a 402 error when credits are insufficient.

What does the response include?

The response includes a gen- request id, the model that served the request, usage token counts, and a finish_reason such as stop, length, or tool_calls.

How do I check the cost of a request?

Use the id from the response to query GET /api/v1/generation, which returns token counts and total_cost for that request.

How do I install openrouter-hello-world?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is openrouter-hello-world free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is openrouter-hello-world safe to use?

It scores 75 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit without limits). Review the code before you install. How grades work.

What are alternatives to openrouter-hello-world?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

openrouter-hello-world Install

Add to stack

Loading.