Skip to Content
Getting StartedcURL Quickstart

cURL Quickstart

No SDK required. The gateway is a standard HTTP proxy.

Health Check (No Auth)

curl https://api.curate-me.ai/v1/health

Chat Completion (OpenRouter — 200+ models)

The simplest way to get started. OpenRouter gives you access to models from every major provider through a single path:

curl https://api.curate-me.ai/v1/openrouter/chat/completions \ -H "X-CM-API-Key: cm_sk_xxx" \ -H "Content-Type: application/json" \ -d '{ "model": "anthropic/claude-haiku-4-5", "messages": [{"role": "user", "content": "Hello!"}] }'

Chat Completion (Direct OpenAI)

If you have your own OpenAI key, pass it via X-Provider-Key:

curl https://api.curate-me.ai/v1/openai/chat/completions \ -H "Content-Type: application/json" \ -H "X-CM-API-Key: cm_sk_xxx" \ -H "X-Provider-Key: sk-your-openai-key" \ -d '{ "model": "gpt-4o", "messages": [{"role": "user", "content": "Hello!"}] }'

Anthropic Messages (Direct)

curl https://api.curate-me.ai/v1/anthropic/messages \ -H "Content-Type: application/json" \ -H "X-CM-API-Key: cm_sk_xxx" \ -H "X-Provider-Key: sk-ant-your-anthropic-key" \ -H "anthropic-version: 2023-06-01" \ -d '{ "model": "claude-sonnet-4-5-20250929", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello!"}] }'

Streaming

Add "stream": true to the request body:

curl https://api.curate-me.ai/v1/openrouter/chat/completions \ -H "X-CM-API-Key: cm_sk_xxx" \ -H "Content-Type: application/json" \ -N \ -d '{ "model": "anthropic/claude-haiku-4-5", "stream": true, "messages": [{"role": "user", "content": "Count to 10 slowly."}] }'

List Models

curl https://api.curate-me.ai/v1/models \ -H "X-CM-API-Key: cm_sk_xxx"

Response Headers

Every gateway response includes:

HeaderDescription
X-CM-Request-IdUnique request tracking ID inside the gateway
X-CM-CostEstimated cost of the request in USD
X-CM-Governance-Time-MsMilliseconds spent in the governance chain
X-CM-Trace-IdW3C trace ID for distributed tracing
X-CM-Daily-CostCurrent daily spend for the org
X-CM-Daily-BudgetActive daily budget used by governance
RateLimit-LimitMax requests per minute (IETF standard)
RateLimit-RemainingRequests remaining in current window
RateLimit-ResetWindow reset timestamp

Error Codes

CodeMeaning
401Invalid or missing gateway API key
403Request blocked by governance policy, budget controls, or model access rules
202Request is pending human approval
429Rate limit exceeded
502Upstream provider error