Developer Guide

One OpenAI-Compatible API for Claude, GPT, Gemini & DeepSeek

Access 22+ AI models through a single endpoint. Use the same OpenAI SDK you already know — just change the base URL. Set up in 5 minutes.

Get Free API Key → Quickstart Docs

How It Works

FuturMix implements the OpenAI API specification — the same /v1/chat/completions endpoint format used by OpenAI. This means any code, SDK, or tool built for OpenAI works with FuturMix out of the box.

The difference: through FuturMix, you can access models from Anthropic, Google, DeepSeek, ByteDance, and Kimi — not just OpenAI — all through the same API key and endpoint.

⚡ One change, all models
Set base_url = "https://futurmix.ai/v1" and use model IDs like claude-sonnet-4-6, gpt-5.4, gemini-2.5-pro, or deepseek-chat-v3. Your existing OpenAI code works without any other changes.

API Endpoints

FuturMix supports three API formats. Use whichever your tools require:

OpenAI-Compatible

https://futurmix.ai/v1
Works with: All OpenAI SDKs, Cursor, Aider, Continue, Cline, LangChain
Endpoints: /chat/completions, /responses, /models

Native Anthropic

https://futurmix.ai/anthropic
Works with: Claude Code, Anthropic SDK
Endpoints: /v1/messages, /v1/models

Native Gemini

https://futurmix.ai/gemini
Works with: Google AI SDK
Endpoints: /v1beta/models/:generateContent

Available Models

All models are accessible through the OpenAI-compatible endpoint. Use these model IDs in your API calls:

Model ID Provider Input/1M Output/1M Context
claude-sonnet-4-6Anthropic$2.70$13.50200K
claude-opus-4-6Anthropic$4.50$22.50200K
claude-haiku-4-5-20251001Anthropic$0.90$4.50200K
gpt-5.4OpenAI$1.75$10.50200K
gpt-5.4-miniOpenAI$0.53$3.15200K
gpt-5.4-nanoOpenAI$0.14$0.88200K
gemini-2.5-proGoogle$1.00$8.001M
gemini-2.5-flashGoogle$0.24$2.001M
deepseek-chat-v3DeepSeek$0.19$0.77128K
deepseek-r1DeepSeek$0.39$1.53128K

Prices include FuturMix discount (10-30% off official rates). View all 22+ models →

5-Minute Setup

Create your account

Sign up at futurmix.ai/register. No credit card required to start. Get your API key from the dashboard.

Set your base URL and API key

Replace OpenAI's URL with FuturMix's. Everything else stays the same.

# Environment variables (works with most tools) export OPENAI_API_BASE="https://futurmix.ai/v1" export OPENAI_API_KEY="sk-your-futurmix-key"

Choose a model and make your first call

Use any model ID from the table above. Here's a complete example:

Python
from openai import OpenAI client = OpenAI( base_url="https://futurmix.ai/v1", api_key="sk-your-futurmix-key", ) # Use Claude through OpenAI SDK response = client.chat.completions.create( model="claude-sonnet-4-6", messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Explain quantum computing in 3 sentences."}, ], max_tokens=500, ) print(response.choices[0].message.content)
Node.js / TypeScript
import OpenAI from 'openai'; const client = new OpenAI({ baseURL: 'https://futurmix.ai/v1', apiKey: 'sk-your-futurmix-key', }); const response = await client.chat.completions.create({ model: 'gemini-2.5-pro', messages: [{ role: 'user', content: 'Hello' }], });
cURL
curl https://futurmix.ai/v1/chat/completions \ -H "Authorization: Bearer sk-your-futurmix-key" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-chat-v3", "messages": [{"role": "user", "content": "Hello"}], "stream": true }'
Streaming (Python)
# Streaming works exactly like OpenAI stream = client.chat.completions.create( model="claude-sonnet-4-6", messages=[{"role": "user", "content": "Write a short poem"}], stream=True, ) for chunk in stream: if chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="")

Tool Integration Guide

Here's how to configure popular developer tools to use FuturMix:

Claude Code

# Uses native Anthropic format export ANTHROPIC_BASE_URL="https://futurmix.ai/anthropic" export ANTHROPIC_API_KEY="sk-your-futurmix-key"

Cursor

# Settings > Models > OpenAI API Key # Base URL: https://futurmix.ai/v1 # API Key: sk-your-futurmix-key # Model: claude-sonnet-4-6 (or any model ID)

Aider

export OPENAI_API_BASE="https://futurmix.ai/v1" export OPENAI_API_KEY="sk-your-futurmix-key" aider --model claude-sonnet-4-6

Continue (VS Code)

// .continue/config.json { "models": [{ "provider": "openai", "model": "claude-sonnet-4-6", "apiBase": "https://futurmix.ai/v1", "apiKey": "sk-your-futurmix-key" }] }

LangChain

from langchain_openai import ChatOpenAI llm = ChatOpenAI( base_url="https://futurmix.ai/v1", api_key="sk-your-futurmix-key", model="claude-sonnet-4-6", )

Error Handling

FuturMix returns standard OpenAI-format error responses. Your existing error handling code works without changes.

HTTP CodeMeaningAction
400Bad request (invalid params)Check request body format
401Invalid API keyCheck your API key in the dashboard
402Insufficient creditsTop up your account balance
429Rate limitedBack off and retry (auto-failover may handle this)
500Server errorRetry with exponential backoff
503Model temporarily unavailableTry a different model or wait
# Error handling example try: response = client.chat.completions.create( model="claude-sonnet-4-6", messages=[{"role": "user", "content": "Hello"}], ) except openai.AuthenticationError: print("Invalid API key") except openai.RateLimitError: print("Rate limited — retrying...") except openai.APIError as e: print(f"API error: {e}")

Frequently Asked Questions

What is an OpenAI-compatible API?
An OpenAI-compatible API implements the same endpoint format as OpenAI (/v1/chat/completions) but lets you access models from multiple providers. You use the same OpenAI SDK — just change the base_url to point to the alternative provider.
Can I use Claude through an OpenAI-compatible API?
Yes. FuturMix provides all Claude models (Sonnet 4, Opus 4.6, Haiku 4.5) through its OpenAI-compatible endpoint at https://futurmix.ai/v1. Use the OpenAI SDK with model names like claude-sonnet-4-6. FuturMix also supports the native Anthropic API at /anthropic for tools like Claude Code.
Does FuturMix support the native Anthropic API format too?
Yes. FuturMix supports three API formats: OpenAI-compatible (/v1), native Anthropic Messages (/anthropic/v1/messages), and native Gemini GenerateContent (/gemini/v1beta/models). Use whichever format your tools require — same API key works for all three.
What tools work with FuturMix's OpenAI-compatible API?
Any tool that supports OpenAI's API format: Claude Code, Cursor, Aider, Cline, Continue, Windsurf, LangChain, LlamaIndex, and any custom code using the OpenAI SDK for Python, Node.js, Go, or PHP.
How do I handle errors?
FuturMix returns standard OpenAI-format error responses with HTTP status codes (400, 401, 429, 500) and error objects. Your existing OpenAI error handling code works without changes. FuturMix also provides automatic failover — if one provider endpoint fails, requests are routed to a backup.
Is there a rate limit?
FuturMix does not enforce hard rate limits for paid accounts. If you hit provider-level limits, FuturMix's auto-failover routes to an alternative endpoint. For enterprise volume requirements, contact admin@futurmix.ai.

Start Using 22+ AI Models Through One API

Get a free API key, set your base URL, and access Claude, GPT, Gemini, and DeepSeek in under 5 minutes.