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, embeddings, image, and speech).

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

Models

25 gateway models across chat/reasoning, embeddings, image, and speech. The authoritative, always-current list is GET /v1/models.

Chat & reasoning
POST /v1/chat/completions
gpt-6-astragpt-5.6-solgpt-5.6-terra gpt-5.6-lunagpt-5.5 gpt-chat-latest gpt-5.4gpt-5.4-mini gpt-5.4-nanogpt-5.3-codex gpt-5gpt-5-mini gpt-5-nano o3gpt-oss-120bkimi-k3
Reasoning models: reserve headroom with max_completion_tokens.
Embeddings
POST /v1/embeddings
text-embedding-3-smalltext-embedding-3-large text-embedding-ada-002
1536 / 3072 / 1536 dimensions.
Image
POST /v1/images/generations
gpt-image-2.5-flare gpt-image-2.5-sunburst gpt-image-2 gpt-image-1.5 gpt-image-1
Use https://direct-api.aiforbiz.email/v1 for every image-generation request.
Speech-to-text
POST /v1/audio/transcriptions
whisper
Upload audio (wav / mp3 / m4a / …); returns text.
Reasoning models. gpt-5.x, o3, and gpt-oss-120b 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-oss-120b is the open-weight option and the lowest-cost reasoning model ($0.15 / $0.60 per 1M in / out); it returns the final answer in content and its thinking in reasoning_content, so keep max_completion_tokens high. gpt-chat-latest requires max_completion_tokens (it rejects max_tokens). kimi-k3 always reasons, supports a 1M-token context window, and accepts reasoning_effort values low, high, or max.

Pricing

GPT Image 2.5 Flare and Sunburst use OpenAI published customer rates per 1M tokens; Azure provider cost is unverified. Cached input is billed instead of, not in addition to, the corresponding uncached input.

USD per 1M tokens. 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.

ModelInputCached inputOutput
gpt-6-astra$10.00$1.00$50.00
gpt-5.6-sol$4.00$0.40$20.00
gpt-5.6-terra$2.00$0.20$12.00
gpt-5.6-luna$0.20$0.02$1.20
gpt-5.5$5.00$0.50$30.00
gpt-chat-latest$5.00$0.50$30.00
gpt-5.4$2.50$15.00
gpt-5.4-mini$0.75$4.50
gpt-5.4-nano$0.20$1.25
gpt-5.3-codex$1.75$0.175$14.00
gpt-5$1.25$0.125$10.00
gpt-5-mini$0.25$0.025$2.00
gpt-5-nano$0.05$0.005$0.40
o3$2.00$8.00
gpt-oss-120b$0.15$0.60
kimi-k3$3.30$0.33$16.50
text-embedding-3-small$0.02
text-embedding-3-large$0.13
text-embedding-ada-002$0.10
whisper$0.36 per audio-hour
gpt-image-2.5-flareText $5 / image $8Text $1.25 / image $2Image $30
gpt-image-2.5-sunburstText $5 / image $8Text $1.25 / image $2Image $30
gpt-image-2billed per generated image
gpt-image-1.5billed per generated image
gpt-image-1billed per generated image (original, preview)
Long context. For GPT-6 Astra and GPT-5.6 requests with more than 272,000 input tokens, the whole request uses the long-context rate. Input / cached input / output per 1M tokens: Astra $20 / $2 / $75, Sol $8 / $0.80 / $30, Terra $4 / $0.40 / $18, Luna $0.40 / $0.04 / $1.80. Astra cache writes cost $12.50/1M at standard context and $25/1M above 272K.
GPT-5.6 throughput. Each GPT-5.6 tier uses a 750 rpm / 750K tpm Global Standard primary and a 250 rpm / 250K tpm EU Data Zone fallback.

Endpoints

GET/v1/pricing

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"
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-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.3-codex, gpt-5, gpt-5-mini, gpt-5-nano, o3, gpt-oss-120b, kimi-k3. (gpt-5.3-codex 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.)

FieldNotes
modelany chat / reasoning model above
messagesarray of {role, content}
max_completion_tokensreserve headroom for reasoning + answer
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-6-astra and gpt-5.3-codex (Azure does not expose chat completions for these models). Use your SDK's client.responses.create(...) or POST directly.

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-flare and gpt-image-2.5-sunburst (12 requests per minute each; access requires explicit authorization), gpt-image-2 (up to 56 requests per minute), gpt-image-1.5, or gpt-image-1. Returns base64 image data.
Required: use https://direct-api.aiforbiz.email/v1 for every image-generation request and set your client timeout to ≥ 300s.

FieldNotes
modelgpt-image-2.5-flare, gpt-image-2.5-sunburst, gpt-image-2, gpt-image-1.5, or gpt-image-1
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.
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/concurrency. Azure edit and safety errors pass through.

POST/v1/embeddings

Vector embeddings. Models: text-embedding-3-small, text-embedding-3-large, 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. Model: whisper. 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=whisper"
GET/key/info

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
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, ...}}
# 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")

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.

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)