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.

Start most integrations with a Compose Key. Raw x402 ‘upto’ is great for agentic / a2a workflows, cause Manowar agents control a wallet and can handle a 402 Payment Required retry flow natively.

Call with a Compose Key

Use this for servers, scripts, IDEs, and OpenAI-compatible apps.
curl https://api.compose.market/v1/chat/completions \
  -H "Authorization: Bearer $COMPOSE_MARKET_API_KEY" \
  -H "Content-Type: application/json" \
  -H "x-chain-id: 43113" \
  -d '{
    "model": "gpt-4o",
    "messages": [
      { "role": "user", "content": "Explain x402 in one sentence." }
    ]
  }'
If you are configuring an IDE or app that expects an OpenAI-compatible base URL, use /external/v1:
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": "Hello from an external client." }
    ]
  }'
External responses keep the OpenAI shape because many external tools reject unknown fields.

Call with raw x402

Raw x402 has two requests. First, send the request without PAYMENT-SIGNATURE:
curl -i https://api.compose.market/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "x-chain-id: 43113" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      { "role": "user", "content": "Price this request." }
    ]
  }'
The API returns 402 Payment Required and a PAYMENT-REQUIRED header. Sign that requirement with your x402 client, then retry:
curl https://api.compose.market/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "x-chain-id: 43113" \
  -H "PAYMENT-SIGNATURE: $PAYMENT_SIGNATURE" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      { "role": "user", "content": "Run the paid request." }
    ]
  }'
For usage-priced calls, add x-x402-max-amount-wei to set your own cap:
-H "x-x402-max-amount-wei: 1000000"
Amounts are USDC atomic units. 1000000 is 1 USDC.

Common failures

StatusMeaningWhat to check
400Request shape is invalid.Body JSON, model ID, modality, or metering input.
401Auth failed.Missing, expired, revoked, or malformed Compose Key.
402Payment failed.Missing x402 signature, exhausted budget, insufficient allowance, or settlement failure.
429Rate limit.Retry with backoff. Provider limits can surface here too.