Skip to main content
POST
/
api
/
keys
Compose Keys
curl --request POST \
  --url https://api.compose.market/api/keys \
  --header 'Content-Type: application/json' \
  --header 'x-session-user-address: <x-session-user-address>' \
  --data '
{
  "budgetLimit": {},
  "expiresAt": {},
  "chainId": {},
  "purpose": "<string>",
  "name": "<string>"
}
'
{
  "keyId": "<string>",
  "token": "<string>",
  "budgetLimit": {},
  "budgetRemaining": {}
}

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.

Compose Keys are bearer credentials with a budget, expiry, purpose, owner wallet, and chain ID. They are used by native routes, paid runtime routes, and external OpenAI-compatible routes.

Routes

MethodPathDescription
POST/api/keysCreate a Compose Key.
GET/api/keysList keys owned by a wallet.
GET/api/keys/{keyId}Inspect one key.
DELETE/api/keys/{keyId}Revoke one key.
POST/api/keys/settleLegacy direct settlement using a Compose Key.

Create body

budgetLimit
number | string
required
Positive integer budget in USDC atomic units.
expiresAt
number | string
required
Unix timestamp in milliseconds. Must be in the future.
chainId
number | string
required
Chain ID used for key settlement.
purpose
string
required
session or api.
name
string
Optional display name.

Headers

x-session-user-address
string
required
Owner wallet address for create and list operations.
Authorization
string
Required for inspecting and revoking a key: Bearer compose-... for the target key or another live key owned by the same wallet.

Response

keyId
string
Key identifier.
token
string
Bearer token returned when a key is created. List and inspect routes do not return token material.
budgetLimit
string | number
Configured budget in USDC atomic units.
budgetRemaining
string | number
Available budget after used and reserved amounts.