Agent skill · writing content · jeremylongshore
openrouter-hello-world
Send your first OpenRouter API request and understand the response.
Why this skill is useful
Provides specific API usage patterns and response handling for OpenRouter that the AI wouldn't reliably generate on its own.
What it needs
Requires curl, jq, node, python3 installed locally. Requires openrouter account access. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
OpenRouter Hello World Overview Send a minimal chat completion request through OpenRouter, understand the response format, try different models, and verify the full round-trip works. All requests go to the single endpoint POST https://openrouter.ai/api/v1/chat/completions. Prerequisites An OpenRouter API key (sk-or-v1-...) exported as OPENROUTERAPIKEY — see the openrouter-install-auth skill for setup curl and jq for the command-line request, or Python 3.8+ / Node.js 18+ with the OpenAI SDK (pip install openai / npm install openai) A free-tier model works for every step here (no credits required for :free models) Instructions 1. Export your key: export OPENROUTERAPIKEY="sk-or-v1-...". 2. Send the minimal cURL request below and confirm you get a choices[0].message.content back. 3. Read the Response Format section to identify the four key fields (id, model, usage, finishreason). 4. Repeat the same request from your app language using the Python or TypeScript example. 5. Swap model IDs per Try Different Models to confirm multi-model access works with the same code. 6. Query GET /api/v1/generation?id=gen-... per Check Generation Cost to verify cost tracking on the request you just sent. Minimal Request (cURL) Response Format Key fields: id (gen-...) -- use this to query generation stats via GET /api/v1/generation?id=gen-abc123xyz model -- confirms which model actually served the request usage -- token counts for cost calculation finishreason -- stop (complete), length (hit maxtokens), toolcalls (function call) Python Example TypeScript Example Try Different Models Check Generation Cost Output A successful round-trip produces: A chat completion JSON with choices[0].message.content holding the model's reply, a gen-... …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/openrouter-hello-world--cf6284