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 (OpenAI)

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

Anthropic Messages

curl https://api.curate-me.ai/v1/anthropic/messages \ -H "Content-Type: application/json" \ -H "X-CM-API-Key: YOUR_GATEWAY_KEY" \ -H "X-Provider-Key: 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/openai/chat/completions \ -H "Content-Type: application/json" \ -H "X-CM-API-Key: YOUR_GATEWAY_KEY" \ -H "X-Provider-Key: YOUR_OPENAI_KEY" \ -N \ -d '{ "model": "gpt-4o", "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: YOUR_GATEWAY_KEY"

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-Daily-CostCurrent daily spend for the org
X-CM-Daily-BudgetActive daily budget used by governance
X-RateLimit-LimitMax requests per minute
X-RateLimit-RemainingRequests remaining
X-RateLimit-ResetWindow reset timestamp
X-Idempotency-KeyRetry-safe key for the upstream request
X-Process-TimeGateway processing time (seconds)

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