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.
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).
https://api.aiforbiz.email/v1
Auth Authorization: Bearer YOUR_KEY
Balance GET /key/info · dashboard
24 gateway models across chat/reasoning, realtime, embeddings, image, and speech-to-text. The authoritative, always-current list is GET /v1/models. Every model runs on Azure: Global Standard in Sweden Central, with the US Data Zone in East US as a fallback pool.
max_completion_tokens.https://direct-api.aiforbiz.email/v1 for every image-generation request.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 is a Responses-API model: call it via /v1/responses.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, Global Standard rates. GPT-6 Astra and GPT-5.6 follow OpenAI Standard pricing; other models use the
listed provider rates. Your spend accrues at these rates; live balance and per-model daily usage
are in your dashboard. Applications can read
the same base prices without an API key from GET /v1/pricing.
| Model | Input | Cached input | Output | Capacity (rpm / tpm) |
|---|---|---|---|---|
gpt-6.1-sol | $2.00 | $0.10 | $10.00 | 6,496 / 6.496M |
gpt-6-astra | $10.00 | $1.00 | $50.00 | 9,397 / 9.397M |
gpt-6-sol | $2.00 | $0.20 | $10.00 | 5,394 / 5.394M |
gpt-6-luna | $0.10 | $0.01 | $0.50 | 9,064 / 9.064M |
gpt-5.6-sol | $4.00 | $0.40 | $20.00 | 8,163 / 8.163M |
gpt-5.6-terra | $2.00 | $0.20 | $12.00 | 5,064 / 5.064M |
gpt-5.6-luna | $0.20 | $0.02 | $1.20 | 12,064 / 12.064M |
gpt-5.5 | $5.00 | $0.50 | $30.00 | 5,131 / 5.131M |
gpt-chat-latest | $5.00 | $0.50 | $30.00 | 11,467 / 11.467M |
gpt-5.4 | $2.50 | $0.25 | $15.00 | 25,425 / 3.249M |
gpt-5.4-mini | $0.75 | $0.075 | $4.50 | 5,775 / 5.775M |
gpt-5.4-nano | $0.20 | $0.02 | $1.25 | 26,950 / 26.95M |
gpt-5.4-pro | $30.00 | $30.00 | $180.00 | 616 / 0.616M |
credit-floor-no-azure-capacity | – | – | – | 0 rpm |
gpt-6.1-terra | $1.00 | $0.05 | $5.00 | 13,802 / 13.802M |
gpt-realtime-2 | Text $4.00 / audio $32.00 | $0.40 | Text $24.00 / audio $64.00 | 800 / 0.4M |
gpt-realtime-2.1 | Text $4.00 / audio $32.00 | $0.40 | Text $24.00 / audio $64.00 | 800 / 0.4M |
gpt-realtime-2.1-mini | Text $0.60 / audio $10.00 | $0.06 | Text $2.40 / audio $20.00 | 800 / 0.4M |
text-embedding-3-large | $0.13 | – | – | 61,950 / 27.7M |
text-embedding-3-small | $0.02 | – | – | 58,950 / 27.2M |
gpt-image-2.5-sunburst | Text $5.00 / image $8.00 | Text $1.25 / image $2.00 | Image $30.00 | 14 rpm |
gpt-image-2.5-flare | Text $5.00 / image $8.00 | Text $1.25 / image $2.00 | Image $30.00 | 14 rpm |
gpt-image-2 | Text $5.00 / image $8.00 | Text $1.25 / image $2.00 | Image $30.00 | 14 rpm |
gpt-transcribe | $0.27 per audio-hour | 40 / 0.04M | ||
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; your running total and remaining budget
are GET /key/info. 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.Public, machine-readable base prices. No API key is required. Add
?model=gpt-5.6-sol to return one model. Token prices are USD per 1M tokens;
cached input and long-context rates are included when configured. Variable image/audio
models identify their billing dimension without inventing a fixed token price.
curl "https://api.aiforbiz.email/v1/pricing?model=gpt-5.6-sol"
List the models available to your key.
curl https://api.aiforbiz.email/v1/models \
-H "Authorization: Bearer $AIFORBIZ_KEY"
Chat and reasoning. Models: 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, credit-floor-no-azure-capacity, gpt-6.1-terra.
(gpt-5.4-pro is a Responses-API model: call it via /v1/responses
below; the OpenAI-style /v1/chat/completions is auto-translated, but an Azure-SDK
.chat.completions call returns 404.)
| Field | Notes |
|---|---|
model | any chat / reasoning model above |
messages | array of {role, content} |
max_completion_tokens | reserve headroom for reasoning + answer |
stream | optional, 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
}'
Responses API. Required for gpt-5.4-pro
(Azure does not expose chat completions for this model).
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. Set the tool's model to
gpt-image-2.5-flare or gpt-image-2.5-sunburst;
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",
"model": "gpt-image-2.5-sunburst",
"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."
}'
Generate an image. Models: gpt-image-2.5-sunburst, gpt-image-2.5-flare, gpt-image-2. The GPT Image 2.5 models are limited to 14 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.
| Field | Notes |
|---|---|
model | gpt-image-2.5-sunburst, gpt-image-2.5-flare, gpt-image-2 |
prompt | text description |
size | e.g. 1024x1024 |
n | number 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
}'
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.
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 [email protected] \
-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.
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. 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). 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"}, ...]}
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"
Cancel the items that have not started. Items already running finish and keep their result.
| Limit | Value |
|---|---|
| Items per batch | 10, all for one model |
| Queued or running items per API key | 50, counting batch items and waiting calls together (429 beyond that) |
| Retention | 1 hour after submission; then the batch and its images are deleted (404) |
| Who can read it | only the API key that created the batch; any other key gets 404 |
| Restart | if the gateway restarts, items not yet finished fail with gateway restarted, resubmit |
/v1/chat/completions and /v1/completions requests wait up to about
90 s for a pool to come back instead of failing at once with "No deployments available"; only after that do they
return 429. Streaming requests wait before the stream starts.Vector embeddings. Models: text-embedding-3-large, text-embedding-3-small.
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"
}'
Speech-to-text. Model: gpt-transcribe. Multipart upload of an audio file; returns {"text": ...}.
curl https://api.aiforbiz.email/v1/audio/transcriptions \
-H "Authorization: Bearer $AIFORBIZ_KEY" \
-F "[email protected]" \
-F "model=gpt-transcribe"
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.
Your key's budget and running spend, so you can show remaining balance in-app without opening
the dashboard. 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.
Budget left = max_budget − spend (USD). A null
max_budget means the key is uncapped.
Field (under info) | Meaning |
|---|---|
spend | total USD spent on this key so far |
max_budget | the key's budget cap in USD (null = uncapped) |
soft_budget | alert threshold, if one is set (null = none) |
key_alias | your 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, ...}}
# remaining budget = max_budget - spend = 99.58 USD
# Python: remaining budget in a couple of lines
import requests
info = requests.get("https://api.aiforbiz.email/key/info",
headers={"Authorization": f"Bearer {AIFORBIZ_KEY}"}).json()["info"]
remaining = None if info["max_budget"] is None else info["max_budget"] - info["spend"]
print(remaining, "USD left")
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())
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)
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.
| Header | Meaning |
|---|---|
x-litellm-response-cost | USD cost of this request, no markup (may be scientific notation, e.g. 8.45e-06) |
x-litellm-key-spend | your key's running total spend, USD |
x-litellm-call-id | unique 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)