Invite only

The AI for Biz API is open to invited keys only. Keys issued before October 2026 are disabled. With an invited key, GET /v1/models lists the models it can call; the model and price tables below list the models and base prices of the invite-only gateway.

AI for Biz MENA

API Reference

An OpenAI-compatible gateway. Point any OpenAI SDK at the base URL below, use your API key as a bearer token, and call the models enabled on your account (chat & reasoning, realtime, embeddings, image, and speech-to-text).

Base URL  https://api.aiforbiz.email/v1 Auth  Authorization: Bearer YOUR_KEY Limits  RPM / TPM per model Balance  GET /key/info  ·  dashboard

Models

51 gateway models across chat/reasoning, realtime, embeddings, image, and speech-to-text. The authoritative, always-current list is GET /v1/models. Chat models go to the OpenAI API first (except gpt-6.2-astra, gpt-6.2-sol, gpt-chat-latest, gpt-5.4-pro, gpt-5.3-codex, gpt-5.2, gpt-5.2-codex, gpt-5.1, gpt-5.1-codex, gpt-5.1-codex-max, gpt-5.1-codex-mini, gpt-5, gpt-5-codex, gpt-5-mini, gpt-5-nano, gpt-5-pro, gpt-4o and gpt-4o-mini, which run on Azure only); when OpenAI cannot serve a call (rate limit, used-up credit, or an error Azure may not give), it moves to Azure. A Responses conversation that started on OpenAI (previous_response_id or encrypted reasoning) moves too: the gateway sends the stored conversation to Azure, which reasons again from it. It stays on OpenAI, and the error comes back to you, when the conversation refers to an uploaded file (file_id) or its stored history cannot be read in time; when the OpenAI key that holds it is cooling down and the conversation cannot move, the gateway answers 429 itself. Every other model runs on Azure. On Azure, Global Standard comes first, then the EU, US and APAC Data Zone pools of several Azure accounts as fallbacks, and for some models a regional Standard pool last.

Chat & reasoning
POST /v1/chat/completions · POST /v1/responses
gpt-6.2-astragpt-6.2-solgpt-6.1-solgpt-6-astragpt-6-solgpt-6-lunagpt-5.6-solgpt-5.6-terragpt-5.6-lunagpt-5.5gpt-chat-latestgpt-5.4gpt-5.4-minigpt-5.4-nanogpt-5.4-progpt-5.3-codexgpt-5.2gpt-5.2-codexgpt-5.1gpt-5.1-codexgpt-5.1-codex-maxgpt-5.1-codex-minigpt-5gpt-5-codexgpt-5-minigpt-5-nanogpt-5-progpt-4ogpt-4o-minigpt-6.1-terra
Reasoning models: reserve headroom with max_completion_tokens.
Audio chat
POST /v1/chat/completions
gpt-audiogpt-audio-1.5gpt-audio-mini
Text and audio in, text and audio out.
Realtime
WebSocket /v1/realtime
gpt-realtimegpt-realtime-1.5gpt-realtime-2gpt-realtime-2.1gpt-realtime-2.1-minigpt-realtime-mini
Low-latency speech sessions.
Embeddings
POST /v1/embeddings
text-embedding-3-largetext-embedding-3-smalltext-embedding-ada-002
3072 / 1536 dimensions.
Image
POST /v1/images/generations
gpt-image-2.5-sunburstgpt-image-2.5-flaregpt-image-2gpt-image-1.5gpt-image-1-mini
Use https://direct-api.aiforbiz.email/v1 for every image-generation request.
Speech-to-text
POST /v1/audio/transcriptions
gpt-4o-mini-transcribegpt-4o-transcribegpt-4o-transcribe-diarizegpt-transcribe
Upload audio (wav / mp3 / m4a / …); returns text.
Reasoning models. gpt-5.x and gpt-6.x models spend tokens on internal reasoning before the visible answer. Set max_completion_tokens generously (a few hundred or more), or you may get an empty reply because the budget was consumed by reasoning. gpt-chat-latest requires max_completion_tokens (it rejects max_tokens). gpt-5.4-pro and gpt-5.3-codex and gpt-5.2-codex and gpt-5.1-codex and gpt-5.1-codex-max and gpt-5.1-codex-mini and gpt-5-codex and gpt-5-pro are Responses-API models: call them via /v1/responses. On reasoning models (GPT-5 or newer and the o series) the gateway ignores temperature and top_p: it removes them before the call, so a request with temperature: 0 still succeeds.
Content filtering. The gateway's standard Azure content filter, relaxed-v1, blocks hate, sexual, violence and self-harm content only at High severity, in the prompt and in the answer. With it, jailbreak, indirect-attack and protected-material detection only annotate and never block. The gateway sets it on every Azure deployment it creates. A blocked prompt returns HTTP 400 with code content_filter. A blocked answer ends with finish_reason: "content_filter" on /v1/chat/completions, and with status incomplete and incomplete_details.reason: "content_filter" on /v1/responses.

Pricing

GPT image models are billed per token of text and image input and image output, at Azure’s rates per 1M tokens. Cached input is billed instead of, not in addition to, the corresponding uncached input.

USD per 1M tokens at the primary Azure deployment's configured rate. Prices use Azure rates, with OpenAI's Standard list price for gpt-6.2-astra, gpt-6.2-sol and gpt-6.1-terra (Azure has not published one) and derived rates for some regional pools. A fallback pool uses its own configured rate. Charges use Azure-reported usage, including cached input. Live balance and per-model daily usage are in your dashboard. Applications can read every model's price without an API key from GET /public/model_hub.

Model prices, USD per 1M tokens unless stated otherwise: Azure's rate, or OpenAI's list price where Azure has not published one
ModelInputCached inputOutputPrice source
gpt-6.2-astra$8.00$0.40$40.00OpenAI list price (Azure has not published one)
gpt-6.2-sol$2.00$0.10$10.00OpenAI list price (Azure has not published one)
gpt-6.1-sol$2.00$0.10$10.00Azure
gpt-6-astra$10.00$1.00$50.00Azure
gpt-6-sol$2.00$0.20$10.00Azure
gpt-6-luna$0.10$0.01$0.50Azure
gpt-5.6-sol$4.00$0.40$20.00Azure
gpt-5.6-terra$2.00$0.20$12.00Azure
gpt-5.6-luna$0.20$0.02$1.20Azure
gpt-5.5$5.00$0.50$30.00Azure
gpt-chat-latest$5.00$0.50$30.00Azure
gpt-5.4$2.50$0.25$15.00Azure
gpt-5.4-mini$0.75$0.075$4.50Azure
gpt-5.4-nano$0.20$0.02$1.25Azure
gpt-5.4-pro$30.00$30.00$180.00Azure
gpt-5.3-codex$1.75$0.175$14.00Azure
gpt-5.2$1.75$0.175$14.00Azure
gpt-5.2-codex$1.75$0.175$14.00Azure
gpt-5.1$1.25$0.125$10.00Azure
gpt-5.1-codex$1.25$0.125$10.00Azure
gpt-5.1-codex-max$1.25$0.125$10.00Azure
gpt-5.1-codex-mini$0.25$0.025$2.00Azure
gpt-5$1.25$0.125$10.00Azure
gpt-5-codex$1.25$0.125$10.00Azure
gpt-5-mini$0.25$0.025$2.00Azure
gpt-5-nano$0.05$0.005$0.40Azure
gpt-5-pro$15.00$15.00$120.00Azure
gpt-4o$2.50$1.25$10.00Azure
gpt-4o-mini$0.15$0.075$0.60Azure
gpt-6.1-terra$1.00$0.05$5.00OpenAI list price (Azure has not published one)
gpt-audioText $2.50 / audio $40.00$2.50Text $10.00 / audio $80.00Azure
gpt-audio-1.5Text $2.50 / audio $32.00$2.50Text $10.00 / audio $64.00Azure
gpt-audio-miniText $0.60 / audio $10.00$0.60Text $2.40 / audio $20.00Azure
gpt-realtimeText $4.00 / audio $32.00$0.40Text $16.00 / audio $64.00Azure
gpt-realtime-1.5Text $4.00 / audio $32.00$0.40Text $16.00 / audio $64.00Azure
gpt-realtime-2Text $4.00 / audio $32.00$0.40Text $24.00 / audio $64.00Azure
gpt-realtime-2.1Text $4.00 / audio $32.00$0.40Text $24.00 / audio $64.00Azure
gpt-realtime-2.1-miniText $0.60 / audio $10.00$0.06Text $2.40 / audio $20.00Azure
gpt-realtime-miniText $0.60 / audio $10.00$0.06Text $2.40 / audio $20.00Azure
text-embedding-3-large$0.13––Azure
text-embedding-3-small$0.02––Azure
text-embedding-ada-002$0.10––Azure
gpt-image-2.5-sunburstText $5.00 / image $8.00Text $1.25 / image $2.00Image $30.00Azure
gpt-image-2.5-flareText $5.00 / image $8.00Text $1.25 / image $2.00Image $30.00Azure
gpt-image-2Text $5.00 / image $8.00Text $1.25 / image $2.00Image $30.00Azure
gpt-image-1.5Text $5.00 / image $8.00Text $1.25 / image $2.00Image $32.00Azure
gpt-image-1-miniText $2.00 / image $2.50Text $0.20 / image $0.25Image $8.00Azure
gpt-4o-mini-transcribeText $1.25 / audio $3.00–$5.00Azure
gpt-4o-transcribeText $2.50 / audio $6.00–$10.00Azure
gpt-4o-transcribe-diarizeText $2.50 / audio $6.00–$10.00Azure
gpt-transcribe$0.27 per audio-hourAzure
Long context. For requests with more than 272,000 input tokens to these models, the whole request uses the long-context rate. Input / cached input / output per 1M tokens: gpt-6.2-astra $16.00 / $0.80 / $60.00, gpt-6.2-sol $4.00 / $0.20 / $15.00, gpt-6.1-sol $4.00 / $0.20 / $15.00, gpt-6-astra $20.00 / $2.00 / $75.00, gpt-6-sol $4.00 / $0.40 / $15.00, gpt-6-luna $0.20 / $0.02 / $0.75, gpt-5.6-sol $8.00 / $0.80 / $30.00, gpt-5.6-terra $4.00 / $0.40 / $18.00, gpt-5.6-luna $0.40 / $0.04 / $1.80, gpt-5.5 $10.00 / $1.00 / $45.00, gpt-5.4 $5.00 / $0.50 / $22.50, gpt-5.4-pro $60.00 / $60.00 / $270.00, gpt-6.1-terra $2.00 / $0.10 / $7.50. Cache writes per 1M tokens (standard / above 272K): gpt-6.2-astra $10.00 / $20.00, gpt-6.2-sol $2.50 / $5.00, gpt-6.1-sol $2.50 / $5.00, gpt-6-astra $12.50 / $25.00, gpt-6-sol $2.50 / $5.00, gpt-6-luna $0.125 / $0.25, gpt-5.6-sol $5.00 / $10.00, gpt-5.6-terra $2.50 / $5.00, gpt-5.6-luna $0.25 / $0.50, gpt-6.1-terra $1.25 / $2.50.
Capacity. Each model's requests and tokens per minute are in Rate limits. Chat models try the OpenAI API first (except gpt-6.2-astra, gpt-6.2-sol, gpt-chat-latest, gpt-5.4-pro, gpt-5.3-codex, gpt-5.2, gpt-5.2-codex, gpt-5.1, gpt-5.1-codex, gpt-5.1-codex-max, gpt-5.1-codex-mini, gpt-5, gpt-5-codex, gpt-5-mini, gpt-5-nano, gpt-5-pro, gpt-4o and gpt-4o-mini, which run on Azure only), billed at the model's Global Standard rate. On Azure the primary pool is Global Standard where the model has one; when Azure rate-limits it, the request moves to the next pool (Global on another account, an EU, US or APAC Data Zone pool, or a regional Standard pool last). A request Azure rejects (HTTP 400, for example a safety rejection) is returned at once and is not retried on other pools. Rates in the table, and their price source, are the primary deployment's; a fallback pool bills at its own rate.
How charges are computed. A request is charged at the rate of the deployment that served it: its model, its capacity type (Global Standard, or the EU, US or APAC Data Zone) and its region. Cached input is billed at the cached rate instead of the uncached rate, and cache writes are charged where Azure bills them (the GPT-5.6 and GPT-6 models). The Responses API web_search tool adds $14 per 1,000 Bing searches. Above 272,000 input tokens the whole request, not just the excess, uses the long-context rate. The amount you are charged for a single call is the x-litellm-response-cost response header; this key's running total and remaining budget are GET /key/info, and the account total for several keys is in the dashboard. The table above is the base rate for each model's primary deployment; if a request falls back to a secondary capacity type, that deployment's rate applies to it.

Rate limits

Requests per minute (RPM) and tokens per minute (TPM) for each model: the total of all Azure pools that serve it. Over a limit you get 429, usually with Retry-After (without it, back off a few seconds; a stream that already started carries the error as an event); image calls wait in the image queue instead. A dash means the model is limited by requests only.

Model capacity across the gateway's Azure pools
ModelTypeRPMTPMAzure pools
gpt-6.2-astraChat3,8983,898,0008
gpt-6.2-solChat3,8983,898,0008
gpt-6.1-solChat1,0001,000,0008
gpt-6-astraChat800800,0006
gpt-6-solChat800800,0006
gpt-6-lunaChat800800,0006
gpt-5.6-solChat1,1001,100,0008
gpt-5.6-terraChat900900,0006
gpt-5.6-lunaChat900900,0006
gpt-5.5Chat3,3203,320,0006
gpt-chat-latestChat3,3323,332,0006
gpt-5.4Chat5,5001,000,0007
gpt-5.4-miniChat8,0008,000,0008
gpt-5.4-nanoChat14,00014,000,0004
gpt-5.4-proResponses320320,0002
gpt-5.3-codexResponses32,0003,200,0006
gpt-5.2Chat9,000900,0006
gpt-5.2-codexResponses20,0002,000,0002
gpt-5.1Chat9,000900,0006
gpt-5.1-codexResponses2,0002,000,0002
gpt-5.1-codex-maxResponses20,0002,000,0002
gpt-5.1-codex-miniResponses2,0002,000,0002
gpt-5Chat9,000900,0006
gpt-5-codexResponses2,0002,000,0002
gpt-5-miniChat3,2003,200,0006
gpt-5-nanoChat18,00018,000,0006
gpt-5-proResponses3,200320,0002
gpt-4oChat12,6002,100,0006
gpt-4o-miniChat80,0008,000,0006
gpt-6.1-terraChat3,8983,898,0008
gpt-audioChat360,00060,000,0002
gpt-audio-1.5Chat360,00060,000,0002
gpt-audio-miniChat24040,0002
gpt-realtimeRealtime400200,0002
gpt-realtime-1.5Realtime800400,0004
gpt-realtime-2Realtime400200,0002
gpt-realtime-2.1Realtime800400,0004
gpt-realtime-2.1-miniRealtime400200,0002
gpt-realtime-miniRealtime120400,0002
text-embedding-3-largeEmbeddings18,0008,000,0008
text-embedding-3-smallEmbeddings18,0008,000,0008
text-embedding-ada-002Embeddings18,0008,000,0008
gpt-image-2.5-sunburstImage4–2
gpt-image-2.5-flareImage4–2
gpt-image-2Image4–2
gpt-image-1.5Image24–4
gpt-image-1-miniImage24–2
gpt-4o-mini-transcribeSpeech-to-text120,0001,200,0002
gpt-4o-transcribeSpeech-to-text80,8001,600,0004
gpt-4o-transcribe-diarizeSpeech-to-text80,000800,0002
gpt-transcribeSpeech-to-text2020,0002

Claude models

14 Claude models from Anthropic, for keys that have Claude access (ask us to add it). Prices are Anthropic’s list prices in USD per 1M tokens and come out of the same key budget as the other models. Each call goes to our first Anthropic account; on a rate limit or an Anthropic error it moves to the second account. claude-opus-4-5-20251101 runs on the first account only. A request Anthropic rejects (HTTP 400) is returned at once.

Claude models: context window / max output, and Anthropic list prices, USD per 1M tokens
ModelContext / max outputInputCache write, 5 minCache write, 1 hourCache readOutput
claude-fable-5-21M / 128K$8.00$10.00$16.00$0.20$40.00
claude-fable-5-11M / 128K$10.00$12.50$20.00$0.25$50.00
claude-fable-51M / 128K$10.00$12.50$20.00$1.00$50.00
claude-opus-5-51M / 128K$4.00$5.00$8.00$0.20$20.00
claude-opus-51M / 128K$5.00$6.25$10.00$0.50$25.00
claude-opus-4-81M / 128K$5.00$6.25$10.00$0.50$25.00
claude-opus-4-71M / 128K$5.00$6.25$10.00$0.50$25.00
claude-opus-4-61M / 128K$5.00$6.25$10.00$0.50$25.00
claude-opus-4-5-20251101200K / 64K$5.00$6.25$10.00$0.50$25.00
claude-sonnet-5-51M / 128K$2.00$2.50$4.00$0.10$10.00
claude-sonnet-51M / 128K$2.00$2.50$4.00$0.20$10.00
claude-sonnet-4-61M / 128K$3.00$3.75$6.00$0.30$15.00
claude-haiku-5-5 (prompt up to 100K)1M / 128K$0.10$0.125$0.20$0.01$0.50
claude-haiku-5-5 (prompt over 100K)1M / 128K$0.50$0.625$1.00$0.05$2.50
claude-haiku-4-5-20251001200K / 64K$1.00$1.25$2.00$0.10$5.00
Claude notes. Endpoints: /v1/chat/completions and /v1/messages (/v1/responses is not available for Claude). Tools: only tools your application runs itself (custom or function tools, and Anthropic’s bash, text editor, computer and memory tools). Anthropic’s server tools (web search, web fetch, code execution, tool search, MCP connector), container, context_management and web_search_options are not available, and neither is a Chat file block with a file_id that is not a PDF, plain text or image. Fast mode (speed) and US-only inference (inference_geo) are not available: the gateway removes these fields, so the call runs at the standard speed and price. The anthropic-beta values context-1m-* and fast-mode-* are removed (the 200K models stay at 200K), and the advisor tool is not available. Model names are the Anthropic API names, for example claude-opus-5-5.
POST/v1/chat/completions

Claude through the OpenAI format: any OpenAI SDK, with a Claude model name.

curl https://api.aiforbiz.email/v1/chat/completions \
  -H "Authorization: Bearer $AIFORBIZ_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-5-5", "max_tokens": 1024,
       "messages": [{"role": "user", "content": "Hello!"}]}'
POST/v1/messages

Claude through the native Anthropic Messages API: the Anthropic SDKs and Claude Code work with the gateway as their base URL. Send your gateway key as x-api-key or as Authorization: Bearer.

curl https://api.aiforbiz.email/v1/messages \
  -H "x-api-key: $AIFORBIZ_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-5-5", "max_tokens": 1024,
       "messages": [{"role": "user", "content": "Hello!"}]}'

# pip install anthropic
import anthropic

client = anthropic.Anthropic(base_url="https://api.aiforbiz.email", api_key="YOUR_KEY")
msg = client.messages.create(model="claude-sonnet-5-5", max_tokens=1024,
                             messages=[{"role": "user", "content": "Hello!"}])
print(msg.content[0].text)

# Claude Code
export ANTHROPIC_BASE_URL=https://api.aiforbiz.email
export ANTHROPIC_AUTH_TOKEN=YOUR_KEY
claude --model claude-opus-5-5

Endpoints

GET/public/model_hub

Public, machine-readable model list and prices. No API key is required. One entry per public model with model_group, mode, input_cost_per_token and output_cost_per_token (USD per token: multiply by 1,000,000 for the per-1M price), context limits, shared rpm / tpm capacity and capability flags. A model served from several pools shows its highest pool rate (a Data Zone rate is often above Global, by 20% in some regions); the exact charge for a non-streaming call is its x-litellm-response-cost header. The old GET /v1/pricing endpoint is retired.

curl https://api.aiforbiz.email/public/model_hub
# [{"model_group":"gpt-5.6-luna","mode":"chat","input_cost_per_token":2.2e-07,
#   "output_cost_per_token":1.32e-06,"max_input_tokens":922000,"rpm":12064,"tpm":12064000, ...}, ...]
GET/v1/models

List the models available to your key.

curl https://api.aiforbiz.email/v1/models \
  -H "Authorization: Bearer $AIFORBIZ_KEY"
POST/v1/chat/completions

Chat and reasoning. Models: gpt-6.2-astra, gpt-6.2-sol, gpt-6.1-sol, gpt-6-astra, gpt-6-sol, gpt-6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-chat-latest, gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.4-pro, gpt-5.3-codex, gpt-5.2, gpt-5.2-codex, gpt-5.1, gpt-5.1-codex, gpt-5.1-codex-max, gpt-5.1-codex-mini, gpt-5, gpt-5-codex, gpt-5-mini, gpt-5-nano, gpt-5-pro, gpt-4o, gpt-4o-mini, gpt-6.1-terra. (gpt-5.4-pro and gpt-5.3-codex and gpt-5.2-codex and gpt-5.1-codex and gpt-5.1-codex-max and gpt-5.1-codex-mini and gpt-5-codex and gpt-5-pro are Responses-API models: call it via /v1/responses below; the OpenAI-style /v1/chat/completions is auto-translated, but an Azure-SDK .chat.completions call returns 404.)

Chat Completions fields
FieldNotes
modelany chat / reasoning model above
messagesarray of {role, content}
max_completion_tokensreserve headroom for reasoning + answer
temperature, top_poptional; ignored on reasoning models (GPT-5 or newer, o series): the gateway removes them before the call
streamoptional, true for token streaming
curl https://api.aiforbiz.email/v1/chat/completions \
  -H "Authorization: Bearer $AIFORBIZ_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      {"role": "user", "content": "Summarize relativity in two sentences."}
    ],
    "max_completion_tokens": 500
  }'
POST/v1/responses

Responses API. Required for gpt-5.4-pro, gpt-5.3-codex, gpt-5.2-codex, gpt-5.1-codex, gpt-5.1-codex-max, gpt-5.1-codex-mini, gpt-5-codex, gpt-5-pro (Azure does not expose chat completions for these models). Use your SDK's client.responses.create(...) or POST directly.

Built-in image_generation tool. gpt-5.6-sol, gpt-5.6-terra and gpt-5.6-luna can generate and edit images inline, using the same request shape as OpenAI. On Azure pools with a configured GPT Image 2.5 deployment the tool runs on that deployment (usually gpt-image-2.5-flare), whatever the tool's model names, and the image is billed at the rates of the model that ran. The gateway sends Azure's image-deployment header and sets the tool's model itself, so you can leave model out of the tool and need no extra header. The fields action, quality, size, background, output_format, moderation and max_tool_calls all apply. The image arrives as base64 in an image_generation_call output item, and the image tokens are reported separately under tool_usage.image_gen and billed at the GPT Image 2.5 rates above, on top of the orchestrating model's own tokens.
Required: use https://direct-api.aiforbiz.email/v1 for image-generating requests and set your client timeout to ≥ 300s. stream: true is not supported together with this tool.

curl https://direct-api.aiforbiz.email/v1/responses \
  -H "Authorization: Bearer $AIFORBIZ_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.6-luna",
    "tools": [{
      "type": "image_generation",
      "quality": "low",
      "action": "edit",
      "moderation": "low"
    }],
    "max_tool_calls": 1,
    "input": [{
      "role": "user",
      "content": [
        {"type": "input_text", "text": "Mount the picture flat on the wall."},
        {"type": "input_image", "detail": "low", "image_url": "https://your-host/photo.png"}
      ]
    }]
  }'
curl https://api.aiforbiz.email/v1/responses \
  -H "Authorization: Bearer $AIFORBIZ_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-astra",
    "input": "Write a Python function that reverses a linked list."
  }'
POST/v1/images/generations

Generate an image. Models: gpt-image-2.5-sunburst, gpt-image-2.5-flare, gpt-image-2, gpt-image-1.5, gpt-image-1-mini. The GPT Image 2.5 models are limited to 4 requests per minute each and need explicit authorization. Returns base64 image data.
Required: use https://direct-api.aiforbiz.email/v1 for every image-generation request and set your client timeout to ≥ 300s.

Image generation fields
FieldNotes
modelgpt-image-2.5-sunburst, gpt-image-2.5-flare, gpt-image-2, gpt-image-1.5, gpt-image-1-mini
prompttext description
sizee.g. 1024x1024
nnumber of images
curl https://direct-api.aiforbiz.email/v1/images/generations \
  -H "Authorization: Bearer $AIFORBIZ_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A watercolor fox in a misty forest",
    "size": "1024x1024",
    "n": 1
  }'
POST/v1/images/edits

Edit a PNG or JPEG hosted at a public HTTPS URL with gpt-image-2, gpt-image-2.5-flare, or gpt-image-2.5-sunburst. Send JSON with exactly one of image_url or image_urls. The gateway authenticates the key before downloading, blocks private/internal destinations, validates the image, and then sends its bytes through the normal LiteLLM/Azure edit path. gpt-image-1.5 and gpt-image-1-mini take edits only as a multipart file upload, not by URL.
Required: use https://direct-api.aiforbiz.email/v1 and set the client timeout to ≥ 300s.

curl https://direct-api.aiforbiz.email/v1/images/edits \
  -H "Authorization: Bearer ***" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "image_url": "https://cdn.example.com/input.png",
    "prompt": "Change the background to a beach",
    "quality": "medium"
  }'
curl --max-time 300 https://direct-api.aiforbiz.email/v1/images/edits \
  -H "Authorization: Bearer $LITELLM_API_KEY" \
  -F model=gpt-image-2.5-flare -F image=@input.png \
  -F prompt="Change the background to a beach" \
  -F quality=low -F size=1024x1024

Use gpt-image-2.5-sunburst for Sunburst. Omit response_format. Existing multipart uploads remain supported on the same endpoint. URL inputs must use HTTPS on port 443, resolve only to public addresses, return a valid PNG/JPEG, and stay within the 20 MiB combined input limit. Optional URL fields: image_urls (up to four images) and mask_url. These models return data[].b64_json; Azure does not provide URL output. The JSON adapter returns one edited image per request.

Adapter errors: 400 unsafe/unreachable URL, 401/403 auth/access, 408 download timeout, 413 size/pixels, 415 invalid image, and 429 budget/rate limit, or a queue wait that would pass the limit (see Image queue and batches). Azure edit and safety errors pass through.

POST/v1/images/batches

Image queue and batches. Image calls never fail just because a model is at its Azure rate limit. /v1/images/generations and /v1/images/edits (JSON and multipart) wait in a fair line per model, one turn per API key, and go out as soon as Azure has room. The response is the normal image response plus the header x-aiforbiz-queue-wait-ms (time spent waiting). A call waits up to 60 s on api.aiforbiz.email and up to 240 s on direct-api.aiforbiz.email; if the wait would pass that, you get 429 with a Retry-After header. If you have several images, or a call that may wait, submit a batch instead and collect the results later (a batch takes generations and URL edits; a multipart edit with gpt-image-1.5 or gpt-image-1-mini stays a direct call). Closing the connection removes a waiting call from the line.

Submit 1 to 10 items for one model. Each item is a generation (prompt, optional size, quality, n, background) or an edit (the same fields plus image_url or image_urls, optional mask_url, public HTTPS URLs as above; an edit item needs gpt-image-2, gpt-image-2.5-flare or gpt-image-2.5-sunburst). Access and the model are checked once, up front. The reply is 202 with the batch id (imgb_...) and an item list. Every item is still billed to your key like a normal call.

curl https://api.aiforbiz.email/v1/images/batches \
  -H "Authorization: Bearer $AIFORBIZ_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "items": [
      {"type": "generation", "prompt": "A watercolor fox in a misty forest", "size": "1024x1024", "quality": "low"},
      {"type": "edit", "prompt": "Change the background to a beach", "image_url": "https://cdn.example.com/input.png"}
    ]
  }'

# → 202 {"id":"imgb_...","object":"image.batch","status":"in_progress","model":"gpt-image-2",
#            "created_at":1760000000,"expires_at":1760003600,"items":[{"index":0,"status":"queued"}, ...]}
GET/v1/images/batches/{id}

Poll a batch. The batch status is in_progress while any item is queued or running, then completed (at least one image succeeded), failed or cancelled. Each item has its own status (queued, running, succeeded, failed, cancelled). A succeeded item carries result (the usual image response with data[].b64_json) and cost in USD (the same figure as x-litellm-response-cost); a failed item carries error.message. Add ?results=false to poll statuses without the image data. Poll every few seconds.

curl https://api.aiforbiz.email/v1/images/batches/imgb_... \
  -H "Authorization: Bearer $AIFORBIZ_KEY"
DELETE/v1/images/batches/{id}

Cancel the items that have not started. Items already running finish and keep their result.

Image queue limits
LimitValue
Items per batch10, all for one model
Queued or running items per API key50, counting batch items and waiting calls together (429 beyond that)
Retention1 hour after submission; then the batch and its images are deleted (404)
Who can read itonly the API key that created the batch; any other key gets 404
Restartif the gateway restarts, items not yet finished fail with gateway restarted, resubmit
Chat and text requests never wait. Only image calls are queued. When every route a request can use (the OpenAI API where the model has it, then the Azure pools) is at its limit, /v1/chat/completions, /v1/completions and /v1/responses return 429 at once (in a stream that already started, as an error event), so your client can retry or fall back without delay. When a /v1/responses stream fails before its first event (for example, a pool at its limit), the gateway can try the next account within the request's time budget, and you receive the stream from the account that answers. A conversation that continues a response on one Azure account (previous_response_id or encrypted reasoning) goes back to that account first; when it fails or is busy, the gateway moves the turn to the next account with the stored conversation and without the encrypted reasoning items (the next account reasons again). It stays, and the error comes back to you, when the conversation refers to an uploaded file (file_id), the previous_response_id is not one the gateway returned to you, or its stored history cannot be read in time: as the HTTP status before the first event, or as an error event in a stream that already started. Retry after Retry-After when it is present; without it, back off for a few seconds and retry.
POST/v1/embeddings

Vector embeddings. Models: text-embedding-3-large, text-embedding-3-small, text-embedding-ada-002.

curl https://api.aiforbiz.email/v1/embeddings \
  -H "Authorization: Bearer $AIFORBIZ_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-embedding-3-large",
    "input": "the quick brown fox"
  }'
POST/v1/audio/transcriptions

Speech-to-text. Models: gpt-4o-mini-transcribe, gpt-4o-transcribe, gpt-4o-transcribe-diarize, gpt-transcribe. Multipart upload of an audio file; returns {"text": ...}.

curl https://api.aiforbiz.email/v1/audio/transcriptions \
  -H "Authorization: Bearer $AIFORBIZ_KEY" \
  -F "file=@meeting.wav" \
  -F "model=gpt-transcribe"
POST/v1/decisions

Decisions API. Ask typed questions about text or images and get back probabilities, not prose: predicate (yes or no), choice (pick one of the listed values) and score (a level scale). Use it for classification, routing and moderation. Model: gpt-6-luna only; your key must be allowed that model. input is a string or a message array with input_text and input_image parts. Limits per request: up to 400 questions, 128 images and 32 MB. The reply is Azure's, unchanged: answers (one per question, in order) and usage.

curl https://api.aiforbiz.email/v1/decisions \
  -H "Authorization: Bearer $AIFORBIZ_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-luna",
    "input": "The delivery was late and the box was damaged.",
    "questions": [
      {"type": "predicate", "name": "negative",
       "instructions": "Is the writer unhappy?"},
      {"type": "choice", "name": "topic",
       "instructions": "What is the main complaint?",
       "choices": [{"value": "delivery"}, {"value": "damage"}, {"value": "price"}]},
      {"type": "score", "name": "anger",
       "instructions": "How angry is the writer?",
       "levels": [{"label": "low"}, {"label": "high"}]}
    ]
  }'

Each answer carries its probabilities, for example {"type": "predicate", "name": "negative", "probability": 0.99}, or for a choice {"type": "choice", "name": "topic", "choice": "delivery", "probabilities": [...], "confidence": 0.97}.

Price. Only input tokens are billed; there is no output charge (usage.output_tokens is always 0). Global rate: $0.10 per 1M input tokens, $0.01 per 1M cached input (a small request of about 170 tokens costs about $0.00002). A call answered by a Data Zone account is billed at that zone's gpt-6-luna rate (US $0.11, EU $0.12 per 1M input). Above 272k input tokens the long-context rates apply. The real usage is charged to your key like any other call and the cost is in the x-litellm-response-cost response header. Your budget and your key's gpt-6-luna request and token limits apply (429 with Retry-After when reached; 400 when the budget is spent). Calls move between accounts automatically when one is busy; a 429 or 503 means every account was busy, so retry shortly.

GET/key/info

This key's own budget cap and running spend. Call it with just your key and no parameters; it returns only your own key. Note this route is at the root, not under /v1.
This key's budget left = max_budget − spend (USD). A null max_budget means the key has no cap of its own.
If your account has more than one key, the keys also share one account budget, and requests stop when either cap is reached. This route does not show the account total: see it in the dashboard.

Customer balance fields
Field (under info)Meaning
spendtotal USD spent on this key so far
max_budgetthe key's budget cap in USD (null = uncapped)
soft_budgetalert threshold, if one is set (null = none)
key_aliasyour key's label
curl https://api.aiforbiz.email/key/info \
  -H "Authorization: Bearer $AIFORBIZ_KEY"

# → {"key":"...","info":{"spend":0.42,"max_budget":100.0,"soft_budget":null, ...}}
# this key's budget left = max_budget - spend = 99.58 USD
# Python: this key's budget left in a couple of lines
import requests
resp = requests.get("https://api.aiforbiz.email/key/info",
                    headers={"Authorization": f"Bearer {AIFORBIZ_KEY}"})
if resp.status_code == 429:
    print("account budget used up: see the dashboard")
else:
    resp.raise_for_status()
    info = resp.json()["info"]
    remaining = None if info["max_budget"] is None else info["max_budget"] - info["spend"]
    print(remaining, "USD left on this key")
Per-request cost, not a history download. Every response carries its own charge in the x-litellm-response-cost header (USD); record it on your side if you need a per-request ledger. GET /key/info gives the running total. The raw spend-history endpoint /spend/logs is not available through this API and answers 403; per-model daily usage is in your dashboard.
WS/v1/realtime?model=gpt-realtime-2.1

Realtime voice and text over WebSocket (OpenAI Realtime API, GA protocol) for the gpt-realtime-2* models. Connect with your key in the Authorization: Bearer header and the model in the query string; the server sends session.created, you configure the session with session.update, add turns with conversation.item.create and ask for an answer with response.create. For voice, set "output_modalities": ["audio"], stream microphone audio with input_audio_buffer.append (base64, 16-bit PCM, 24 kHz mono) and play the response.output_audio.delta chunks. Use wss://direct-api.aiforbiz.email for calls longer than about 100 seconds. Billed per text and audio token at the prices above.

# pip install websockets
import asyncio, json, os, websockets

URL = "wss://direct-api.aiforbiz.email/v1/realtime?model=gpt-realtime-2.1"
KEY = os.environ["AIFORBIZ_KEY"]  # your gateway key

async def main():
    async with websockets.connect(URL, additional_headers={"Authorization": f"Bearer {KEY}"}) as ws:
        print(json.loads(await ws.recv())["type"])          # session.created
        await ws.send(json.dumps({"type": "session.update", "session": {
            "type": "realtime", "output_modalities": ["text"],
            "instructions": "You are a helpful call-center assistant. Be brief."}}))
        await ws.send(json.dumps({"type": "conversation.item.create", "item": {
            "type": "message", "role": "user",
            "content": [{"type": "input_text", "text": "Say hello in one sentence."}]}}))
        await ws.send(json.dumps({"type": "response.create"}))
        async for message in ws:
            event = json.loads(message)
            if event["type"] == "response.output_text.delta":
                print(event["delta"], end="", flush=True)
            elif event["type"] == "response.done":
                print(); break
            elif event["type"] == "error":
                print(event["error"]); break

asyncio.run(main())

Python quickstart

Any OpenAI SDK works; only the base URL and key change.

# pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aiforbiz.email/v1",
    api_key="YOUR_KEY",
)

resp = client.chat.completions.create(
    model="gpt-5.5",
    messages=[{"role": "user", "content": "Hello!"}],
    max_completion_tokens=500,
)
print(resp.choices[0].message.content)

Per-call cost

Every non-streaming response carries the exact metered cost of that request in a header, so you can bill per call without reconstructing it from a price list. For streaming requests the header is preliminary because it is sent before all output tokens exist; the exact cost is recorded in gateway spend after the stream closes.

Response cost headers
HeaderMeaning
x-litellm-response-costUSD cost of this request, no markup (may be scientific notation, e.g. 8.45e-06)
x-litellm-key-spendyour key's running total spend, USD
x-litellm-call-idunique request id, useful for reconciliation / support
# curl: -D - dumps the response headers
curl -sS -D - -o /dev/null https://api.aiforbiz.email/v1/chat/completions \
  -H "Authorization: Bearer $AIFORBIZ_KEY" -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.4-nano","messages":[{"role":"user","content":"hi"}],"max_completion_tokens":50}' \
  | grep -i x-litellm-response-cost

# Python: read the header off the raw response, then .parse() for the usual object
raw = client.chat.completions.with_raw_response.create(
    model="gpt-5.5",
    messages=[{"role": "user", "content": "Hello!"}],
    max_completion_tokens=500,
)
cost = float(raw.headers["x-litellm-response-cost"])   # USD for this call
completion = raw.parse()                               # normal ChatCompletion object
print(cost, completion.choices[0].message.content)