Quickstart
Make your first request in two minutes with any OpenAI or Anthropic SDK.
このページはまだ翻訳されていません。英語版を表示しています。
1. Get a key
Create an API key on the API keys page. Keys start with xpl_ and are shown once. Paste it into Add API key at the top of this page and every example fills it in.
export EXPLABS_API_KEY="YOUR_API_KEY"2. Send a request
Point any OpenAI SDK at the base URL. Nothing else changes. Model ids are slugs from GET /v1/models.
/v1/chat/completionscurl https://api.experientiallabs.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-6-luna", "messages": [{"role": "user", "content": "Hello"}]}'3. Or use the Anthropic SDK
The Anthropic SDKs take the bare origin (no /v1); they append /v1/messages themselves. Any catalog slug works, not just Claude.
/v1/messagesfrom anthropic import Anthropic
client = Anthropic(base_url="https://api.experientiallabs.ai", api_key="YOUR_API_KEY")
msg = client.messages.create(model="gpt-6-luna", max_tokens=1024, messages=[{"role": "user", "content": "Hello"}])
print(msg.content[0].text)What comes back
A standard response plus two gateway fields: usage.cost (USD charged) and top-level provider (the provider that served it). The x-request-id header identifies the call in your usage. Next: Coding agents, Errors, How routing works.
{
"id": "chatcmpl-...",
"model": "gpt-6-luna",
"provider": "openai",
"choices": [{"message": {"role": "assistant", "content": "Hello!"}, "finish_reason": "stop"}],
"usage": {"prompt_tokens": 8, "completion_tokens": 3, "total_tokens": 11, "cost": 0.000041, "is_byok": false}
}