Build with one API
Call every model in the catalog with OpenAI-compatible endpoints, pay from the same wallet and keep full control of keys and limits.
curl https://gapze.ir/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "MODEL_SLUG",
"messages": [{"role": "user", "content": "سلام!"}],
"stream": true
}'OpenAI-compatible
Chat completions, responses, embeddings, images, audio and video jobs with familiar request formats and streaming.
Project keys
Separate projects and environments, scoped keys, IP allowlists, expiry and rotation.
Predictable billing
Ask for a binding quote first, cap spend per key, and read balance and usage through the API.
Limits & safety
Per-key rate limits with Retry-After, automatic protection for leaked keys and an appeal process.
Webhooks
Signed events (Standard Webhooks format) for finished jobs and billing with retries and a delivery log.
Test mode
sk_test keys use a built-in simulator and test credits so you can integrate without spending money.
Python
from openai import OpenAI
client = OpenAI(base_url="https://gapze.ir/v1", api_key=os.environ["API_KEY"])
resp = client.chat.completions.create(
model="MODEL_SLUG",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)JavaScript
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://gapze.ir/v1", apiKey: process.env.API_KEY });
const stream = await client.chat.completions.create({
model: "MODEL_SLUG",
messages: [{ role: "user", content: "Hello" }],
stream: true,
});
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content ?? "");Use the official OpenAI SDKs by pointing the base URL to this API. Replace MODEL_SLUG with a model slug from the models page.