Base URL
https://zerofa.aiConfigure by API format
An SDK base URL is not the same as a complete curl request URL. OpenAI SDKs normally include /v1 in base_url, while Anthropic, Gemini, and native passthrough keep the site root.
| API format | SDK base URL | Example path | Authentication header |
|---|---|---|---|
| OpenAI / new-api | https://zerofa.ai/v1 | /chat/completions / /videos | Authorization |
| Anthropic | https://zerofa.ai | /v1/messages | x-api-key |
| Gemini | https://zerofa.ai | /v1beta/models/... | x-goog-api-key |
| Native Volcano Ark passthrough | https://zerofa.ai | /ark/v3/... | Authorization |
Authentication
Create a key on the API Keys page (sk-zerofa-*). Use the authentication header for the selected API format; the key itself is the same. With an official SDK, set api_key to the sk-zerofa-* value and the SDK will add the appropriate header.
Authentication headers by format
# OpenAI-compatible
Authorization: Bearer sk-zerofa-xxx
# Native Anthropic
x-api-key: sk-zerofa-xxx
# Native Gemini
x-goog-api-key: sk-zerofa-xxxRecommended client configuration
import os
from openai import OpenAI
client = OpenAI(
base_url="https://zerofa.ai/v1",
api_key=os.environ["FORNAI_API_KEY"],
)- Keep the API key in server-side environment variables only. Never put it in browser code, source control, or logs.
- Remove the trailing slash from the base URL so SDK path joining does not produce a double slash.
- Record X-Request-ID from failed responses and provide it first when investigating upstream errors, rate limits, or billing.