API Reference
GenCMS provides an OpenAI-compatible API. Base URL: https://gen-cms.com/api/v1
Authentication
Include your API key: Authorization: Bearer gencms_YOUR_KEY
Endpoints
- POST /api/v1/chat/completions
- POST /api/v1/images/generations
- POST /api/v1/embeddings
- POST /api/v1/audio/*
- GET /api/v1/models
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 SSE streaming.