Get started

Quickstart

On this page

Straitly is one OpenAI-compatible API for 117 models. Keep the SDK you already use, change the base URL and the key, and every model is a string in the model field. What is an AI gateway?

Base URL
https://api.straitly.ai/v1
Auth
Authorization: Bearer sk-...
Formats
OpenAI /chat/completions and Anthropic /messages

Make your first request

  1. Create a key. Open the API keys page and create one. Keep it in an environment variable such as STRAITLY_API_KEY. See API keys & authentication for caps and rotation.
  2. Point your client at Straitly. Set the base URL to https://api.straitly.ai/v1. The request and response shapes are the ones your SDK already expects.
  3. Send a request. Pick any id from the models page and send it like this:
    curl https://api.straitly.ai/v1/chat/completions \
      -H "Authorization: Bearer $STRAITLY_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "claude-sonnet-5-5",
        "messages": [{"role": "user", "content": "Hello"}]
      }'
    curl

Use it from your tools

Use the setup guide for your agent or app, or connect directly with your preferred SDK.

Good to know

  • Prepaid, per token. You pay each model’s listed rate from your balance. When the balance runs out, requests return 402 and nothing more is billed. Models & pricing
  • Failed requests are free. They still show in Activity at zero cost, with the reason.
  • Limits. Accounts start at 300 requests a minute and 64 in flight, shared across keys. Every 429 says how long to wait. Errors & limits
  • Streaming and tools work as usual. stream: true, tool calling, vision and structured outputs pass through unchanged. See Streaming, Structured outputs and Prompt caching.
  • Keys you can hand out. Give each app or customer its own key with a daily cap or a lifetime budget, then review the Production checklist. Use Child keys for end customers, or Teams & roles for internal engineers on one shared balance.
  • Zero data retention by default. Prompts and completions are never written to disk or logs and never used for training. Nothing to enable. Zero data retention

Common questions

What is Straitly?

Straitly is one OpenAI-compatible API for 117 AI models from Anthropic, OpenAI, Google, DeepSeek and other labs. Keep the SDK you use, set the base URL to https://api.straitly.ai/v1, and pay per token from a prepaid balance at 40% under the provider's list price.

What base URL and authentication header does Straitly use?

Point any OpenAI-compatible client at https://api.straitly.ai/v1 and pass Authorization: Bearer $STRAITLY_API_KEY. The same key works on OpenAI /v1/chat/completions, /v1/responses and Anthropic /v1/messages.

Do I need a new SDK to switch from OpenAI or Anthropic?

No. Keep your OpenAI SDK, Anthropic SDK, Vercel AI SDK, LangChain or LiteLLM client and change two values: the base URL and the API key. Every model is a string id in the model field.

How do I connect Claude Code, Cursor, Codex or OpenCode?

Set ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN for Claude Code, or set the OpenAI base URL to https://api.straitly.ai/v1 with your Straitly key in Cursor, Codex or OpenCode. Each tool has its own setup guide in these docs.

How do I increase my rate limit?

New accounts start at 300 requests a minute and 64 in flight, shared across keys. Bigger plans are free: open Settings > Usage limits and press Request next to Growth (1,000 a minute, 200 at once) or Scale (3,000 a minute, 500 at once). Every 429 says how long to wait.

How does billing work?

Prepaid credits from $5, with no subscription, no minimum and no fee on top-ups. Each request is billed at 40% under the provider's list price, and failed requests are free.

Get help and join the community

Building with Straitly? Join our Discord for setup questions and integration discussions. For account or billing details, contact support privately.

Never share API keys or setup commands containing keys in a public channel. What to include in a support request