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.
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-worldRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/openrouter-hello-world ~/.gemini/antigravity-cli/skills/openrouter-hello-worldAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install openrouter-hello-world in Antigravity CLI
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 →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
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.
