Before you begin
You need:- an active Aion organization with Model Service access;
- enough Aion credits for the request.
Authentication
Choose credentials based on where the caller runs:Personal API key
Use a personal API key when calling the Model Service directly from a script, API client, or Codex. Open Settings > Personal > API Keys, create a key, and store it in your shell:Deployment client credentials
Aion deployments useAION_CLIENT_ID and AION_CLIENT_SECRET:
- Remote Deployment: Aion displays both values after you create the deployment. Copy them immediately and add them to the runtime’s environment. The client secret is shown only once and cannot be retrieved later.
- GitHub Deployment: Aion injects both values into the hosted runtime environment automatically.
Permissions and attribution
Both authentication paths requiremodel.execute in the organization. A personal API key acts as its user. A
deployment call is authorized and attributed through the runtime’s
Daemon Identity.
Before sending work to a model, Aion also checks the organization’s credit policy. Usage records contain the model,
token counts, Aion credits, result status, and responsible user or Identity. They do not contain the prompt or
generated response.
A failed or cancelled request can still use credits when the model reports consumed work.
Usage
Open Resources > Models, select a model, and open Usage to see copyable examples populated with that model’s exact ID.Choose a client

Make an HTTP request
Copy a model ID from Resources > Models. Model availability and pricing can change, so use an ID from the live catalog instead of guessing a provider model name. ReplacePASTE_MODEL_ID_HERE with the model ID you copied:
Use an SDK adapter
The Python SDK example usesaion_openai_config() with the OpenAI client. Framework adapters provide model objects
configured for the same service:
- LangGraph Model Service uses
aion_chat_model(). - Google ADK Model Service uses
aion_lite_llm(). aion-api-clientprovides shared authentication and Model Service configuration.
llm field in
aion.yaml lets a deployer choose a model from the live catalog.
Application code passes that selected model ID to its SDK adapter.
Configure Codex
SetAION_API_KEY, then add Aion as a provider in your Codex home configuration:
Browse model details and pricing
The Models list shows each model’s provider, prompt and completion price per million tokens, recent token usage, and invocation count. Search the catalog or filter it to models used recently.
Monitor usage and cost
Select a model and open Metrics to inspect Invocations, Prompt Tokens, Completion, Total Cost, and Principal Attribution. Use the 24h, 7d, and 30d controls to change the reporting window.
API behavior
Use
stream: true or send Accept: text/event-stream to stream either creation endpoint. The Responses endpoint
emits named events such as response.output_text.delta and response.completed. Chat Completions emits data frames
and ends with [DONE].
The Responses endpoint is intentionally stateless. Set store to false, include the full conversation context in
each request, and do not send stateful fields such as previous_response_id, conversation, or
background: true.
Troubleshoot a request
What to do next
- Define an
llmconfiguration field when deployers should select the model used by an application. - Use the LangGraph model adapter in a LangGraph application.
- Use the Google ADK model adapter in a Google ADK application.
- Review Identities to understand runtime permissions and usage attribution.