openrouter-hello-world

Featured

Send your first OpenRouter API request and understand the response. Use when learning OpenRouter, testing setup, or verifying connectivity. Triggers: 'openrouter hello world', 'openrouter first request', 'test openrouter', 'openrouter quickstart'.

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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`. ## Minimal Request (cURL) ```bash curl -s https://openrouter.ai/api/v1/chat/completions \ -H "Authorization: Bearer $OPENROUTER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "google/gemma-2-9b-it:free", "messages": [{"role": "user", "content": "Say hello in three languages"}], "max_tokens": 100 }' | jq . ``` ## Response Format ```json { "id": "gen-abc123xyz", "model": "google/gemma-2-9b-it:free", "object": "chat.completion", "created": 1711234567, "choices": [{ "index": 0, "message": { "role": "assistant", "content": "Hello! Bonjour! Hola!" }, "finish_reason": "stop" }], "usage": { "prompt_tokens": 12, "completion_tokens": 8, "total_tokens": 20 } } ``` 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 - `finish_reason` -- `stop` (complete), `length` (hit max_tokens), `tool_calls` (function call) ## Python Example ```python from openai import OpenAI import os client = OpenAI( base_url="https://openrouter.ai/api/v1", api_...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

openrouter-usage-analytics

Track and analyze OpenRouter API usage patterns, costs, and performance. Use when building dashboards, optimizing spend, or reporting on AI usage. Triggers: 'openrouter analytics', 'openrouter usage', 'openrouter metrics', 'track openrouter spend'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

openrouter-model-catalog

Query, filter, and select from OpenRouter's 400+ model catalog. Use when choosing models, comparing pricing, or checking capabilities. Triggers: 'openrouter models', 'list models', 'model catalog', 'compare models', 'available models'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

openrouter-reference-architecture

Design production architectures using OpenRouter as the LLM gateway. Use when planning system design, reviewing architecture, or scaling AI applications. Triggers: 'openrouter architecture', 'openrouter system design', 'openrouter at scale', 'llm gateway architecture'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

openrouter-pricing-basics

Understand OpenRouter pricing, calculate costs, and optimize spend. Use when budgeting, comparing model costs, or tracking spend. Triggers: 'openrouter pricing', 'openrouter cost', 'model pricing', 'openrouter budget', 'how much does openrouter cost'.

2,266 Updated today
jeremylongshore
API & Backend Listed

openrouter-usage

Query OpenRouter API costs, credits, and usage breakdown by model, provider, and date. This skill should be used when checking API spending, auditing costs, or generating usage reports for the last 30 days.

33 Updated yesterday
tdimino