Skip to main content

First chat completion

Assuming you have an API key exported as ALT_API_KEY:

curl -sS https://api.alt.advania.ai/v1/chat/completions \
-H "Authorization: Bearer $ALT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "<model-id-from-/v1/models>",
"messages": [{"role": "user", "content": "Say hello in Swedish."}]
}'

The response body follows the OpenAI chat-completions shape.

To pick a model value, list what your account can call:

curl -sS https://api.alt.advania.ai/v1/models \
-H "Authorization: Bearer $ALT_API_KEY"

Using the OpenAI SDK

The API is designed to be compatible with the OpenAI SDKs (Python, Node) — point them at the base URL above and use your Advania ALT key. Because most major AI frameworks (LangChain, LangGraph, LlamaIndex, etc.) build on the OpenAI SDK, they work with Advania ALT with the same base-URL swap.