Base URL
Endpoint Families
Authentication
Send your YouRouter API key as a bearer token:First API Call
Core Concepts
Main Endpoints
Status Codes
See Create Chat Completion for the core request format, or Multimodal for image and video examples.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Base URL, authentication, headers, and response conventions for model API calls.
https://api.yourouter.ai/v1
| Family | Base path | Use it for |
|---|---|---|
| Model APIs | https://api.yourouter.ai/v1 | Chat Completions, Embeddings, Anthropic Messages, and Google generateContent paths. |
| Video tasks | https://api.yourouter.ai/api/v3 | Ark text-to-video and image-to-video task creation and polling. |
| Custom Search | https://api.yourouter.ai/customsearch/v1 | Google Programmable Search-compatible web search. |
Authorization: Bearer <YOUROUTER_API_KEY>
Content-Type: application/json
curl https://api.yourouter.ai/v1/chat/completions \
-H "Authorization: Bearer $YOUROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Reply with exactly: connected"
}
]
}'
choices[0].message.content
| Concept | How to use it |
|---|---|
| Model selection | Set the model field in the request body. |
| Multimodal input | Send text and image content blocks in messages[].content, or use provider-native multimodal endpoints. |
| Automatic routing | Omit the vendor header, or send vendor: auto. |
| Provider pinning | Send vendor: openai, vendor: anthropic, vendor: google, or another supported provider. |
| Streaming | Set stream: true for incremental server-sent event chunks. |
| Provider-native APIs | Use /messages for Anthropic-compatible calls or Google generateContent paths for Gemini-compatible calls. |
| Endpoint | Purpose |
|---|---|
POST /chat/completions | OpenAI-compatible text and image-input model calls. Recommended for most integrations. |
POST /embeddings | Generate text embeddings with compatible embedding models. |
POST /messages | Anthropic Messages-compatible model calls. |
POST /projects/.../models/{model}:generateContent | Google Gemini generateContent-compatible model calls. |
POST /api/v3/contents/generations/tasks | Task-based video generation calls. |
| Status | Meaning |
|---|---|
200 | Request succeeded. |
400 | The request body, model, or parameter format is invalid. |
401 | The API key is missing or invalid. |
429 | A provider rate limit or concurrency limit was reached. |
500 | The gateway or upstream provider returned an internal error. |