API quickstart
API access is being prepared and is restricted during preview. Use the base URL
and API key provided for your approved account. The public model name is exactly
Gaia, including the capital G.
Create an API key
Section titled “Create an API key”Open Billing & API → API keys in your account tools. Keep keys on a server or in a secret manager. Do not put a key into browser code, a mobile application bundle, a public repository, or a screenshot.
The API uses bearer authentication and an OpenAI-compatible chat-completions
interface. The base URL in these examples includes /v1.
export GAIA_BASE_URL='https://YOUR_APPROVED_API_HOST/v1'export GAIA_API_KEY='YOUR_API_KEY'
curl "$GAIA_BASE_URL/chat/completions" \ -H "Authorization: Bearer $GAIA_API_KEY" \ -H 'Content-Type: application/json' \ -d '{"model":"Gaia","messages":[{"role":"user","content":"Explain why the sky is blue in three sentences."}]}'Python
Section titled “Python”Install the official OpenAI client in your application’s environment:
pip install openaiimport osfrom openai import OpenAI
client = OpenAI( api_key=os.environ["GAIA_API_KEY"], base_url=os.environ["GAIA_BASE_URL"],)response = client.chat.completions.create( model="Gaia", messages=[{"role": "user", "content": "Explain why the sky is blue."}],)print(response.choices[0].message.content)Do not assume every optional OpenAI API parameter or endpoint is supported.
Discover available models with GET /v1/models using your approved base URL.
See streaming, usage, and
error handling before a production integration.