docs/Getting StartedOpenAI Compatible

Quickstart Guide

Start calling 17+ frontier AI models in under 60 seconds with universal OpenAI SDK drop-in compatibility.


Get Started with Unlocked AI Gateway

Unlocked AI provides a unified AI gateway giving developers single-API access to the world's frontier models — including Claude Opus 5.5, Claude Sonnet 5.5, GPT-5, OpenAI o3, Gemini 4 Argon, and DeepSeek R1. Because Unlocked AI strictly implements the standardized OpenAI `/v1` wire specification, any application built with the OpenAI SDK, LangChain, LlamaIndex, or Vercel AI SDK connects by simply updating the `baseURL` and API key.
Universal Drop-In Endpoint
Base URL: `https://unlockedai.net/v1` Authentication: Bearer `sk-unlocked-...` All parameters, tools, structured JSON modes, and token streams work out of the box with zero code restructuring.

Supported Integration Approaches

Choose the integration method suited to your tech stack:
ApproachBest ForSetup Time
Direct REST / cURLAny programming language, bash pipelines, microservices, and Docker containers30 seconds
OpenAI Python SDKFastAPI backends, data science, Jupyter notebooks, LangChain, and automation1 minute
OpenAI TypeScript SDKNext.js, Node.js microservices, Hono, and Cloudflare Workers1 minute
Coding Agents (Claude Code, Cursor)Terminal and IDE pair programming using your Unlocked AI key and credits45 seconds
Vercel AI SDKNext.js App Router streaming chat interfaces with standard React hooks2 minutes

Step 1: Obtain Your Secret API Key

Navigate to the **[Developer Command Center](/developers)** to generate your secret key. Keys are prefixed with `sk-unlocked-` and draw directly from non-expiring pay-as-you-go credits starting at $5.00 with zero monthly seat fees.

Step 2: Make Your First Request

Send a standard JSON POST request to `https://unlockedai.net/v1/chat/completions`:
curl https://unlockedai.net/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <YOUR_UNLOCKED_API_KEY>" \
  -d '{
    "model": "claude-sonnet-5.5",
    "messages": [
      { "role": "system", "content": "You are a senior distributed systems architect." },
      { "role": "user", "content": "Explain the Raft consensus algorithm in 2 concise sentences." }
    ],
    "temperature": 0.7
  }'

Step 3: Streaming Tokens with Server-Sent Events

Pass `"stream": true` to stream partial token deltas in real-time. Unlocked AI delivers sub-millisecond initial chunk latencies across all models.
from openai import OpenAI

client = OpenAI(
    base_url="https://unlockedai.net/v1",
    api_key="<YOUR_UNLOCKED_API_KEY>",
)

stream = client.chat.completions.create(
    model="claude-sonnet-5.5",
    messages=[{"role": "user", "content": "Write a high-performance HTTP pipeline in Rust."}],
    stream=True,
)

for chunk in stream:
    delta = chunk.choices[0].delta.content or ""
    print(delta, end="", flush=True)

Need an Unlocked AI Key or Credits?

Generate secret API keys backed by non-expiring pay-as-you-go credits starting at $5. No monthly minimums.