Get your own API key — unlock full power and higher limits

← API Reference

Chat Completions

Create chat completions. Use model: "auto" for automatic model routing.

Request

POST https://gen-cms.com/api/v1/chat/completions
Content-Type: application/json
Authorization: Bearer gencms_YOUR_KEY

{
  "model": "auto",
  "ability": "chat",
  "messages": [
    {"role": "user", "content": "Hello"}
  ],
  "stream": false,
  "max_tokens": 4096
}

cURL Example

curl -X POST "https://gen-cms.com/api/v1/chat/completions" \
  -H "Authorization: Bearer gencms_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"auto","messages":[{"role":"user","content":"Explain quantum computing"}]}'

Streaming

Set stream: true for Server-Sent Events (SSE) streaming. Response uses text/event-stream.