On this page

DOCS / API REFERENCE

Twelver API & MCP Reference

Wire-level HTTP endpoints, model series capabilities, reasoning_effort controls, async Media API schemas, remote MCP servers, and error codes — generated directly from live server contracts.

Single authentication header across all three surfaces:Authorization: Bearer <api-key>

Three HTTP Surfaces on One Key

SurfaceEndpoint patternConfig IDPurpose
Chat Completionshttps://twelver.app/api/ai/<config-id>/v1/chat/completionsRequiredThe OpenAI-compatible endpoint — what you paste into Cline, opencode, Cursor or any coding agent.
Media APIhttps://twelver.app/api/ai/<config-id>/v1/media/generationsRequiredImages, video, music and speech from your own code: POST creates a job, GET on its id returns the finished files.
MCPhttps://twelver.app/api/mcp/v1/<toolset>NoA remote MCP server per toolset — connects to Claude, Cursor and other MCP clients. No config id needed.

Quickstart Request

OpenAI-compatible Chat Completionsbash
curl https://twelver.app/api/ai/<config-id>/v1/chat/completions \
  -H "Authorization: Bearer $TWELVER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{ "role": "user", "content": "Hello from Twelver API" }]
  }'

Reference by Topic