---
title: "API Quickstart: First Call in 3 Steps | Straitly Docs"
description: "Make your first Straitly call in 3 steps: create a key, set https://api.straitly.ai/v1, send. Curl, Python and JS for 117 models at 40% under list."
url: https://straitly.ai/docs/quickstart
updated: 2026-11-26
publisher: Straitly (https://straitly.ai)
---

Docs

Get started

# Quickstart

Copy docs

**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?](https://straitly.ai/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](https://straitly.ai/app/keys) page and create one. Keep it in an environment variable such as `STRAITLY_API_KEY`. See [API keys & authentication](https://straitly.ai/docs/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](https://straitly.ai/models) and send it like this:
curl Python JavaScript
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"}]
  }'
Copy Copied Failed
curl

### Use it from your tools

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

[Claude Code Choose supported models for the terminal agent.](https://straitly.ai/docs/claude-code) [Cursor Add your key and base URL in settings.](https://straitly.ai/docs/cursor) [Codex Desktop app and CLI, one command.](https://straitly.ai/docs/codex) [Hermes Desktop, terminal and chat gateways.](https://straitly.ai/docs/hermes) [SDKs & frameworks OpenAI, Anthropic, LangChain, Vercel AI.](https://straitly.ai/docs/sdks) [MCP Let an agent check spend, logs and keys.](https://straitly.ai/docs/mcp)

### 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](https://straitly.ai/docs/models)
- **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](https://straitly.ai/docs/errors)
- **Streaming and tools work as usual.** `stream: true`, tool calling, vision and structured outputs pass through unchanged. See [Streaming](https://straitly.ai/docs/streaming), [Structured outputs](https://straitly.ai/docs/structured-outputs) and [Prompt caching](https://straitly.ai/docs/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](https://straitly.ai/docs/production). Use [Child keys](https://straitly.ai/docs/child-keys) for end customers, or [Teams & roles](https://straitly.ai/docs/teams) 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](https://straitly.ai/docs/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.

[Join our Discord](https://discord.gg/caXGZkqXch) [Email support](mailto:support@straitly.ai)

Never share API keys or setup commands containing keys in a public channel. [What to include in a support request](https://straitly.ai/docs/support)

[API keys & authentication](https://straitly.ai/docs/authentication)

---
Markdown version of https://straitly.ai/docs/quickstart.
