Search
/
API Reference
Overview
Quickstart
Principles
Models
Features
Model Routing
Provider Routing
Prompt Caching
Structured Outputs
Message Transforms
Uptime Optimization
Web Search
API Reference
Overview
Authentication
Parameters
Limits
Errors
POST
Completion
POST
Chat completion
GET
Get a generation
GET
List available models
GET
List endpoints for a model
GET
Get credits
POST
Create a Coinbase charge
Use Cases
BYOK
Crypto API
OAuth PKCE
For Providers
Streaming
Community
Frameworks
Discord
API Reference
API Reference
Chat completion
POST
https://openrouter.ai/api/v1
/
chat
/
completions
Send a chat completion request to a selected model
Request
This endpoint expects an object.
model
string
Required
The model ID to use
messages
list of objects
Required
Show 2 properties
stream
boolean
Optional
Response
Successful completion
id
string
Optional
choices
list of objects
Optional
Show property
Built with