curl with idapt
Raw HTTP against the OpenAI, Anthropic, and OpenRouter compatible surfaces.
- 1
Point it at idapt
bashcurl https://idapt.app/api/openai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $IDAPT_API_KEY" \ -d '{"model": "openai/gpt-5.6-luna", "messages": [{"role": "user", "content": "Three facts about ravens."}]}' - 2
Streaming
bashcurl https://idapt.app/api/anthropic/v1/messages \ -H "Content-Type: application/json" \ -H "x-api-key: $IDAPT_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -d '{"model": "anthropic/claude-haiku-4.5", "max_tokens": 256, "stream": true, "messages": [{"role": "user", "content": "Stream a haiku."}]}'The Anthropic dialect wants x-api-key and anthropic-version headers.
- 3
Going further
bashcurl https://idapt.app/api/openrouter/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $IDAPT_API_KEY" \ -d '{"model": "z-ai/glm-5.2", "messages": [{"role": "user", "content": "Three facts about ravens."}]}'The OpenRouter dialect adds provider routing fields and suffixes on top of the OpenAI shape.
GOOD TO KNOW
API keys and scopesOpenAI-compatible API referenceOpenRouter-compatible API referenceRate limits and errorsSwitch from OpenRouter