OpenRouter · Capability
OpenRouter API
OpenRouter provides unified access to hundreds of AI models through a single API endpoint. It implements the OpenAI API specification for chat completions, allowing developers to use any model with the same request and response format. The API also exposes model discovery, generation statistics, credits and balance information, and provisioning endpoints for programmatic key management.
What You Can Do
POST
Createchatcompletion
— Create chat completion
/chat/completions
POST
Createcompletion
— Create completion
/completions
GET
Listmodels
— List available models
/models
GET
Listmodelendpoints
— List endpoints for a model
/models/{author}/{slug}/endpoints
GET
Getgeneration
— Get generation stats
/generation
GET
Getcredits
— Get credit balance
/credits
GET
Listproviders
— List providers
/providers
GET
Listkeys
— List API keys
/keys
POST
Createkey
— Create API key
/keys
GET
Getkey
— Get API key
/keys/{hash}
DELETE
Deletekey
— Delete API key
/keys/{hash}
PATCH
Updatekey
— Update API key
/keys/{hash}
MCP Tools
createchatcompletion
Create chat completion
createcompletion
Create completion
listmodels
List available models
read-only
idempotent
listmodelendpoints
List endpoints for a model
read-only
idempotent
getgeneration
Get generation stats
read-only
idempotent
getcredits
Get credit balance
read-only
idempotent
listproviders
List providers
read-only
idempotent
listkeys
List API keys
read-only
idempotent
createkey
Create API key
getkey
Get API key
read-only
idempotent
deletekey
Delete API key
idempotent
updatekey
Update API key