Use cases

Code. Create images.One account.

Connect Codex, Claude Code and Image Buddy to Flatkey. Keep using your tools, share a prepaid balance, and review usage and costs for each call in the console.

One prepaid balance across tools

The same balance pays for calls from every connected tool.

Usage and cost records in one console

Review the model, token usage and charges for each request.

API keys and quotas under your control

Manage API keys, model access and quotas from the console.

Use cases / 01—03

Choose your tool. Follow its setup.

01

Codex

Best for

Explore repositories, edit files and run tests.

Use Codex in your repository for code exploration, edits and test iterations. Point its model provider at Flatkey and use your Flatkey API key; requests then use your Flatkey balance.

Read the setup guide

Connection

OpenAI-compatible · config.toml
~/.codex/config.toml
base_url
https://router.flatkey.ai/v1
API Key
FLATKEY_API_KEY
Put it to work

CLI coding sessions

Route Codex prompts, edits, and follow-up runs through one Flatkey balance.

Automated fix loops

Use Codex for bug fixes and test iteration while each request remains measurable.

02

Claude Code

Best for

Build features, refactor code and debug.

Keep the Claude Code terminal workflow for feature development, refactoring and debugging. Connect through the Anthropic-compatible endpoint and review the resulting usage and costs in Flatkey.

Read the setup guide

Connection

Anthropic-compatible · settings.json
~/.claude/settings.json
ANTHROPIC_BASE_URL
https://router.flatkey.ai
API Key
ANTHROPIC_AUTH_TOKEN
Put it to work

Repository exploration

Let Claude Code scan, explain, and map large codebases while usage lands in Flatkey.

Refactor loops

Run more edit-test-review cycles with visible cost and prepaid balance control.

03

Image Buddy

Best for

Create product shots, lifestyle scenes and ad images.

Generate product hero images, marketplace shots and UGC-style ad stills from the command line. Install Image Buddy, initialize your account, then submit a prompt. The examples below come from the Image Buddy guide.

Read the setup guide

Image Buddy CLI · install and onboard

  1. 01Install
    npm i -g @flatkey-ai/image-buddy
  2. 02Initialize
    npx @flatkey-ai/image-buddy onboard
  3. 03Generate
    npx @flatkey-ai/image-buddy generate --prompt "Product hero image"
Flatkey / Connection

One balance. Itemized usage.

Calls draw from your prepaid balance. Pricing varies by model and billing method. Check the model prices before connecting, then review usage and charges in the console.

Get connected in three steps.

Get a key
  1. 01

    Create a Flatkey API key

    Create an account and generate an API key in the console.

  2. 02

    Configure your chosen tool

    Follow the matching guide; initialize Image Buddy after installation.

  3. 03

    Review usage in the console

    Send a simple request, then check its model, usage and cost.

Common questions

Do I need to change tools?

Keep using Codex or Claude Code and update the connection configuration. Image Buddy is a separate CLI to install.

How are charges recorded?

Calls routed through Flatkey draw from your prepaid balance. Model pricing and usage records are available in the console.

How do I check the setup?

Send a simple request from the configured tool and check that its model and usage appear in the console.

Are Codex and Claude Code configured the same way?

No. Codex uses an OpenAI-compatible connection, while Claude Code uses an Anthropic-compatible connection. Follow the guide for your tool; their configuration files and setting names differ.

How should I choose a model?

Start with the models supported by your tool and check their availability and prices on Flatkey. Use the exact model ID from the guide or model page, then try a small task before a longer workflow.

What should I check if a request fails?

Check the endpoint, API key, model ID and available balance first. Compare the error with your tool’s setup guide; when asking for help, include the error message and time of the request, but never the full API key.

What can I create with Image Buddy?

The examples on this page cover product hero images, marketplace shots and UGC-style ad stills. Follow the Image Buddy guide to initialize the CLI, then describe the product, scene and intended use in your prompt.

How should I protect my API key?

Keep the key in a local configuration file or environment variable. Do not include it in public repositories, browser code or screenshots. If a key is exposed, disable it in the console and create a replacement.