Documentation / API

API Reference

Use the OpenAI-compatible API to discover available models and send requests.

API base URL
https://3srouter.top/api/v1
GET/models

List models available to your API key.

POST/chat/completions

Create a chat completion, optionally streamed.

Chat completions
curl https://3srouter.top/api/v1/chat/completions \
  -H "Authorization: Bearer $THREESROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_AVAILABLE_MODEL",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Request fields

FieldTypeDescription
modelstringAn enabled model identifier.
messagesarrayMessages with role and content.
streambooleanReturn server-sent events.

Advanced parameters depend on the selected model. View source