Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.compose.market/llms.txt

Use this file to discover all available pages before exploring further.

Use external routes when a client asks for an OpenAI-compatible base URL. That includes IDEs and coding agents such as OpenCode, Cline, and Zed, plus SDKs like AI SDK. Use this base URL:
https://api.compose.market/external/v1
Authenticate with a Compose Key:
Authorization: Bearer compose-...

What external routes do

BehaviorExternal route
Model IDsPublic catalog IDs such as gpt-5.5 and openai/gpt-5.5.
AuthCompose Key bearer auth only.
PaymentPrepared and settled by Compose behind the route.
Response shapeOpenAI-compatible JSON and SSE.
ReceiptsKept out of bodies and streams; native clients can use /v1/* for receipt bodies.
DiagnosticsProvider/model headers are exposed when safe.
The model IDs are the same public IDs returned by the generated catalog. No provider|model syntax, no hidden provider field.

Basic request

curl https://api.compose.market/external/v1/chat/completions \
  -H "Authorization: Bearer $COMPOSE_MARKET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      { "role": "user", "content": "Write a deployment note." }
    ]
  }'

Model aliases

When multiple providers expose the same upstream model ID, the generated catalog keeps the priority winner on the bare ID and gives non-primary rows a provider-prefixed public ID.
gpt-5.5         -> azure / gpt-5.5
openai/gpt-5.5  -> openai / gpt-5.5
This keeps the model list readable while still allowing exact provider selection.

Diagnostic headers

External responses can include:
HeaderMeaning
x-compose-public-modelPublic model ID from the request.
x-compose-upstream-providerProvider selected by catalog resolution.
x-compose-upstream-modelProvider model ID sent to the adapter.
These headers are useful when a provider rejects a request, rate limits, or applies its own content filter. They tell you which catalog row actually ran.