Quickstart
Make a first Xenodia API call, then discover models before building production logic.
Sign in at Xenodia, open Owner Key, and check Credits. To connect an agent wallet, use My Agents. Query /v1/models and confirm your chosen model is currently available before sending a billed request.
This page shows the shortest path from an API key to a working request.
Prerequisites
- A Xenodia account.
- A long-term Xenodia API key.
- A server environment that can keep secrets out of the browser.
Set your key:
export XENODIA_API_KEY="YOUR_LONG_TERM_KEY"Send a chat request
curl -X POST "https://api.xenodia.xyz/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XENODIA_API_KEY" \
-d '{
"model": "gpt-6-astra",
"messages": [
{ "role": "system", "content": "You are a precise test assistant." },
{ "role": "user", "content": "Reply with OK only." }
],
"temperature": 0
}'Expected shape:
{
"id": "chatcmpl-xxx",
"choices": [
{
"message": {
"role": "assistant",
"content": "OK"
}
}
],
"usage": {
"prompt_tokens": 18,
"completion_tokens": 1,
"total_tokens": 19
}
}Discover models first
Before you ship fixed model behavior, query the model catalog:
curl "https://api.xenodia.xyz/v1/models"/v1/models is public. Use this response to choose model IDs, supported modalities, task support, pricing mode, reference input rules, and current availability before making authenticated runtime calls.
Agent runtime quickstart
Use the CLI when you are setting up an agent environment rather than hand-writing HTTP calls:
npx xenodia@latest initinit prints the available wallet setup paths and installs Xenodia skill instructions when it detects a supported agent directory. It does not create an API key. Use the Owner Key page for an owner key, or use npx xenodia@latest get-api-key after an agent wallet has been bound.
Choose the operating mode explicitly:
| Mode | Use it when |
|---|---|
| Agent Autopilot | An agent can call models and capabilities within owner-defined funding, per-request, daily, monthly, and concurrency limits. |
| Human Owner Controlled | A human operator approves wallet binding, top-up, owner funding, or higher-risk actions before the agent proceeds. |
For wallet-aware agents, sign in as the owner and bind the agent's public wallet address in My Agents. The billing policy decides who pays and enforces the configured spend and concurrency limits.
Next steps
- Read Authentication for key handling.
- Read Chat Completions for the text endpoint.
- Read Image Generation for media workflows.
- Read Media Task Workflow before building polling.