Apixly · API
OpenAI-compatible API gateway for GPT, Claude, images and video
Use Apixly as an AI API gateway for chat, images and video. Keep an existing OpenAI-compatible client for compatible endpoints, or use the Anthropic Messages API for Claude integrations. Your key's group determines model access and pricing.
Updated:
Match the client to the endpoint
For an OpenAI SDK, set base_url to https://apixly.ai/v1 and supply your Apixly key. For Anthropic-compatible clients, use https://apixly.ai as the base domain; the client appends /v1/messages. Gemini uses its own endpoint and authentication header. Compatibility does not make all endpoint families interchangeable.
Use the request and response schema documented for the chosen endpoint. OpenAI-style calls use Authorization: Bearer; Anthropic Messages uses x-api-key and anthropic-version. Copy a currently available model ID from the catalog or the authenticated /v1/models response, rather than guessing a display name.
Bind a public group and make a small request
Create an API key in the developer console and bind an eligible group. Choose the OpenAI family for the GPT example below. Start with one short message and no streaming, tools or media. Confirm choices[0].message.content and usage, then inspect the corresponding charge in the console.
After the first completed response, enable streaming or tools one feature at a time. Follow the dedicated image and video guides for async jobs and download behavior. A single balance covers access through the studio and gateway, while model-specific prices and group conditions remain visible in the catalog.
Use it in your existing workflow
The docs include Claude Code, Codex, image generation, video jobs and SDK setup. The n8n directory provides a support-ticket workflow with validation, classification and a human review queue. Start with the integration closest to your application, check actual outputs and costs, and choose a route before increasing volume.
Keep API keys on your server or in the client tool's supported secret configuration. Never embed them in a public webpage. Use the pricing guide to estimate spend and the reliability guide to define acceptance criteria for your workload.
First request
curl https://apixly.ai/v1/chat/completions \
-H "Authorization: Bearer $APIXLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.6-sol","messages":[{"role":"user","content":"Hello"}]}'Run an existing Python client
Install the openai Python package. Set APIXLY_API_KEY on your server and APIXLY_MODEL to an exact model ID available to your key. Use a text model for this first test; no tool, image or streaming support is assumed.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["APIXLY_API_KEY"],
base_url="https://apixly.ai/v1",
timeout=120,
max_retries=0,
)
response = client.chat.completions.create(
model=os.environ["APIXLY_MODEL"],
messages=[{"role": "user", "content": "Hello"}],
stream=False,
)
content = response.choices[0].message.content
if not content:
raise RuntimeError("No text result; inspect the response before continuing")
print(content)
print(response.usage)The example prints the complete text and reported token usage. Match that request to its usage record in the console before increasing traffic. Do not log the API key. Optional features need separate tests on the same model and group.
If the first request fails
- 401
- Check the Apixly key and Authorization header. A ChatGPT login is not an API key.
- 404
- Check the HTTP method, exact model ID and base URL. The SDK appends the endpoint: do not add /v1 twice.
- 429
- Check rate and concurrency limits. Respect Retry-After when returned and use bounded backoff only when retrying is safe.
- 5xx / timeout
- Retain the request identifier and error body. Reconcile an uncertain paid request or task before submitting it again.
Questions & answers
Do I have to rewrite my OpenAI application?
For supported OpenAI-compatible endpoints, change the base URL and API key, then verify your model and required features. Provider-specific APIs, tools and media formats can require additional changes.
Can one key use every model?
Access depends on the key's bound groups. Confirm the group's protocol family and supported model IDs. The catalog and docs explain the available choices.
Related guides
Sources & further reading
Apixly · LearnLink Technology Limited · [email protected]