Skip to main content
idapt
HomeAI ModelsExploreResourcesPricing
Sign inUse for Free
  • Home
  • Pricing
  • AI Models
  • Skills
  • Image models
  • Voice models
  • Video models
  • Rankings
  • Multi-Model Chat
  • Agents
  • Computers
  • Drive
  • Automations
  • AI Gateway
  • All features →
  • Blog
  • About
  • Comparisons
  • Benchmarks
  • Model Match
  • Demos
  • Help center
  • FAQ
  • Privacy
  • Support
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Migrate
  • Downloads
  • Desktop
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)Discord
Help Center
⚡

curl with idapt

Found this helpful? Share it:

Set up curl against idapt's compatible APIs with the steps below. This article and the AI Gateway quickstarts lander render the same shared steps, so they never drift.

curl

curl with idapt

Raw HTTP against the OpenAI, Anthropic, and OpenRouter compatible surfaces.

  1. 1

    Point it at idapt

    bash
    curl 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. 2

    Streaming

    bash
    curl 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. 3

    Going further

    bash
    curl 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

MORE QUICKSTARTS

OpenAI SDK (JS)

Anthropic SDK

n8n

n8n

Related articles

🔑

API keys and scopes

Create a key, choose its scopes, pin it to an API version, rotate it, and cap what it can spend.

🚦

Rate limits and errors

Every error shape the API returns, what each rate limit is, and how to handle a wall in code.

🛡️

Cap what an API key spends

Give every Gateway API key a lifetime, monthly, or daily USD cap, and what a capped-out key returns.

🔗

OpenAI-compatible API

Use idapt's 200+ models from any app that speaks the OpenAI API format.

🔗

OpenAI SDK (JS) with idapt

Point the official OpenAI Node SDK at idapt's compatible API: a three-line change routes 200+ models through your existing code.

🤖

Anthropic SDK with idapt

Point the Anthropic SDK (JS or Python) at idapt's Anthropic-compatible API and keep your Messages API code unchanged.

🔗

n8n with idapt

Use idapt in n8n: an OpenAI credential with a custom base URL, then any catalog model id in the OpenAI/LLM nodes.

Up next

n8n with idapt

Use idapt in n8n: an OpenAI credential with a custom base URL, then any catalog model id in the OpenAI/LLM nodes.

Was this helpful?