OpenAI SDK on any model

Keep the official openai package exactly as it is. Change the base URL and the key, and Chat Completions and Responses reach every text model in the catalogue.

  • Setup in a minute
  • Chat · Responses
  • Official package
  • Streaming

Get an API key

Sign up, add money on the Billing page, then create a key. It starts with sk-live- and is shown only once — copy it straight away.

Create API key

Point OpenAI SDK at FlintBeam

Two changes to your client: base_url and api_key. Everything else in your code stays.

from openai import OpenAI

# Works with the official openai package (pip install openai)
client = OpenAI(
    base_url="https://api.flintbeam.com/v1",
    api_key="sk-live-your-api-key"
)

response = client.chat.completions.create(
    model="openai/gpt-6.1-sol",
    messages=[
        {"role": "system", "content": "You are an experienced software engineer."},
        {"role": "user", "content": "Describe the architecture of a distributed cache."}
    ],
    temperature=0.7,
    max_tokens=1500
)

print(response.choices[0].message.content)

The base URL ends in /v1. The SDK sends the key as Authorization: Bearer, as it already does.

Pick a model

Model names are ours: maker/model, exactly as the catalogue writes them. Click one and the code above changes with it.

Input / output prices, live from the catalogue. All 140 models →

Check it works

Run the script. Within a few seconds the request shows up in Usage in your dashboard, with the model, tokens and the exact price.

What works where

Works

  • Chat Completions and Responses
  • Streaming
  • Every text model by its catalogue ID

Not available

  • Fine-tuning
  • Batches
  • Assistants

If something goes wrong

401Invalid API key

The key is missing, wrong or unknown. Check the header, not the balance.

Check the api_key you pass to the client (or OPENAI_API_KEY), and that the key is Active on the API keys page.

402Not enough balance

Not enough balance for the estimated cost of this request.

Top up on the Billing page, or turn on auto top-up so a long session never stops halfway.

404Model not found

No such model on sale. Check the exact code against /v1/models.

model must be the full catalogue code with the maker in front, maker/model, exactly as the catalogue writes it — copy it from the model’s page.

403Key not allowed for this model

This key may not use that model. The model exists — the key is narrowed.

The model exists, but this key was limited to other models. Widen it under “What this key can reach”, or use another key.

429Too many requests

The key's spending limit, request rate or token rate for this period is reached, or the provider is busy for a moment. Wait as long as Retry-After says.

Wait as long as Retry-After says, then try again.

Ready in a minute

Create a key, point your tool at FlintBeam, keep coding — on any model.

Create API key

Other integrations

All integrations →