MyIP
OpenRouter
搜索
⌘K
首页
Models
Benchmarks
Chat
Rankings
Apps
Ori
Enterprise
Docs
文档
从获取 API 密钥到完整的 API 参考,使用 MyIP OpenRouter 所需的一切。
文档
Overview
Quickstart
From API key to first response in five minutes
Principles
What we guarantee and what we deliberately do not
Models
Which models we serve and where they run
Local GPU models
Models served from our own GPUs, and what cold start means for you
Multimodal inputs
Sending images alongside text
Management API keys
Provisioning and revoking keys programmatically
Models & Routing
Model fallbacks
Declaring a candidate chain with `models[]`
Provider routing
Narrowing and ordering candidates with `provider{}`
Local-first routing
When a model exists locally, local wins
Features
Tool calling
Letting the model call your functions
Structured outputs
Pinning the response shape with a JSON schema
Streaming
What arrives on the SSE stream, and when
Prompt caching
Not paying twice for the same prefix
Reasoning tokens
How thinking tokens are counted and billed
Message transforms
Compressing conversations that outgrow the context window
Pricing
Credits and payment
One credit equals one Korean won; minimum top-up 10,000 KRW
How costs are calculated
USD cost × exchange rate × (1 + margin)
Limits and 402
What happens when the balance runs out
Privacy
Data collection
What we store, and what we never store
Provider logging
What upstream providers see and keep
Integrations
OpenAI SDK
Change one base URL and you are done
Vercel AI SDK
Connecting through `@ai-sdk/openai-compatible`
LangChain
Pointing `ChatOpenAI` at our endpoint
Framework integrations
If it speaks OpenAI, it usually speaks to us
FAQ
FAQ
Short answers about accounts, pricing, models and errors
App attribution
Identifying your app with `HTTP-Referer` and `X-Title`
API 参考
API Overview
API overview
The endpoint list and how far compatibility goes
Authentication
Inference keys and management keys are different keys
Request parameters
What we accept, what we ignore, what we reject
Streaming
SSE chunk format and the final usage chunk
Errors and debugging
The status code / `error_type` pairing
Rate limits
Key limits, balance limits, concurrency
Endpoints
POST /chat/completions
Chat completions, streaming and non-streaming
POST /completions
Legacy text completions
GET /models
Listing and filtering the catalog
GET /models/{author}/{slug}/endpoints
The endpoints that can serve one model
GET /generation
Tokens, cost and attempt history for one request
GET /key and /auth/key
The state of the key you are using
GET and POST /keys
Listing and issuing keys with a management key
GET, PATCH and DELETE /keys/{hash}
Reading, updating and revoking a single key
GET /credits
Total granted and total used
GET /providers
The providers we are connected to
GET /datasets/rankings-daily
Daily model usage snapshots
GET /datasets/app-rankings
App ranking snapshots
GET /benchmarks
Benchmark snapshots
Unsupported endpoints
What returns 404, and why