Skip to main content
Flatkey gives you one key and four ways to spend it. All four share the same account, the same balance, and the same model catalog — so the only question is which one fits how you work.
The four ways to use Flatkey, shown in the Flatkey Console
You do not have to choose once and for all. Start with whichever is closest to what you are doing today, and add the others later against the same key.

Before you start

Create a key at console.flatkey.ai/keys. Flatkey keys begin with sk-. Every option below uses that one key, so keep it in an environment variable and out of source control. Each panel in the Console also lets you pick an existing key instead of creating a new one, and drops it straight into the snippet it shows you.

API for developers

Call any model over plain HTTP with an OpenAI-compatible request. No SDK, no dependencies — if you have an HTTP client, you are ready.
The API for developers panel, with a ready-to-run request
The Console builds the request for you: choose a key, choose a model, and copy the snippet in cURL, Node.js, or Python.

API Access

Base URL, authentication, available endpoints, and error handling.

SDKs for developers

Keep the OpenAI SDK you already use and point it at Flatkey. Your request code does not change — only the base URL does.
The SDKs for developers panel, with the SDK setup
Same idea as above: pick a key and a model, then copy the setup for your language.

OpenAI SDK

Python and Node.js setup, streaming, and tool calling.

Anthropic SDK

Route Claude requests through Flatkey the same way.

Flatkey CLI

Generate images and video from your terminal, or let an AI assistant drive the CLI for you.
The Flatkey CLI panel, showing install, sign in, and first prompt
1

Install

2

Sign in

3

Start creating

Ask your AI assistant for what you want, and let it run the CLI:

Flatkey CLI with AI Agent

Commands, JSON output for agents, and error recovery.

Codex & Claude Code

Connect your coding agent once, then use Flatkey from the projects you already have open.
The Codex and Claude Code panel, with the install command
The Console gives you a single install command for macOS, Linux, or Windows. It installs the agent if you do not have it, asks for your key, and writes the configuration for you.
The installer is interactive. It asks whether you want Claude Code or Codex CLI, and it needs Node.js already installed.

Claude Code

Manual setup or CC Switch.

Codex CLI

Route Codex CLI through Flatkey.

Codex Desktop

Configure the desktop app.

Check that it worked

Whichever option you picked, open Usage Logs in the Console after your first request. You should see it listed with the model, token counts, latency, and cost. Use the Model Name filter in Flatkey Usage Logs If nothing appears, wait a few seconds and search again, then confirm the API key and base URL the request actually used.

Next steps

Model Directory

Every supported model with live pricing and health.

API errors

Status codes, response formats, and what to do about them.

Text Generation

Streaming, tool calling, and structured output.

Video Generation

Submit a task, poll it, and download the MP4.