Send your first request.
Autarcho is an OpenAI-compatible API for open models, billed per generated token in USDC on Solana. Make a key, add credit, send a chat completion. There is no sign-up form and nothing to install. Credit is USDC on Solana, so you do not need a card, and you never send us a name, an email or an ID.
The model runs on a machine someone else operates, so do not send anything you would not hand to a stranger.
Make a key
A key is ak_ followed by 64 lowercase hex characters. Generate one in your
shell:
export AUTARCHO_KEY="ak_$(openssl rand -hex 32)" echo "$AUTARCHO_KEY"
Keep it. Only a hash of the key is stored, so nobody can show it to you again, and a key that is lost takes the balance under it with it.
Add credit
Ask for a payment link under that key:
curl -sS -X POST "https://api.autarcho.com/deposits/intent?amount=10" \ -H "Authorization: Bearer $AUTARCHO_KEY"
The response carries the treasury address, the USDC mint, the amount and a solana_pay_url. Open that URL in any Solana wallet and pay it. Credit appears
under the key once the transfer confirms. The amount is in USDC and defaults to 10.
This is also where an account comes into being. A key is a random number, not a registration, so a key that has never taken a deposit has no balance and no history.
Send a request
List what is available to this key, then send one message:
curl -sS https://api.autarcho.com/v1/models \
-H "Authorization: Bearer $AUTARCHO_KEY"
curl -sS https://api.autarcho.com/v1/chat/completions \
-H "Authorization: Bearer $AUTARCHO_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "<model id>",
"messages": [{"role": "user", "content": "Say hello in five words."}]}' The same request with the OpenAI Python client:
from openai import OpenAI
client = OpenAI(
base_url="https://api.autarcho.com/v1",
api_key="ak_...",
)
stream = client.chat.completions.create(
model="<model id>",
messages=[{"role": "user", "content": "Say hello in five words."}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="") Model ids come from GET /v1/models and can change: models are added and removed
by the operators who run the hardware. Read the id each time rather than hardcoding one.
What does the API support?
Chat completions in the OpenAI shape, with streaming. Text only: no image, audio or file input.
- Works
messages,stream,max_tokens,temperature,top_p,top_k,min_p,presence_penalty,frequency_penalty,logit_bias, the DRY repetition settings,response_formatwithtext,json_objectorjson_schema,toolswithtool_choice, and theIdempotency-Keyheader.- Refused
stop,seed,logprobs,nabove 1, and non-text content. Each one is an error, not a silently ignored field.- Structured output
response_formatwith ajson_schemamakes the model produce a reply that matches that schema, rather than being asked to and usually complying.json_objectasks for JSON with no schema attached.- Tool calls
- A request with
toolscan return a call, and the result goes back as atoolmessage with itstool_call_id. The model reads that turn as text, so a loop works on every model here and not only on ones trained for a native tool block. - Reasoning models
- A model that thinks before it answers returns the reasoning as
reasoning_content, separate fromcontent. - Lists
POST /v1/batchestakes a set of chat requests in one submission and returns them as JSON Lines later, one line per finished request. Useful when a loop has more questions than a conversation. The request shape is on the use page.
Porting a client that already works against OpenAI? The migration page is the diff: three values to change and the five fields this endpoint refuses, with what to send instead.
What it costs
Only the tokens a model generates are billed. The prompt is not. The price is per token,
set by the operator serving that model, and readable before you send anything with GET /model/{hash}/price?for_client=true.
Add max_price_per_token_micro_usdc to a request and it is refused with a 402 if the model now costs more than that, before any credit is reserved. A
request cannot spend more than the balance you hold.
When something goes wrong
Errors carry a code, a message and a retryable flag.
The flag is derived from the code, not the status, because two different 409s
mean opposite things: one says wait, the other says the key is spent.
Send an Idempotency-Key header on any request you might retry. A retry with the
same key and the same body is charged once. The same key with a different body is a 409, because answering a changed question with the first answer would be worse
than refusing.
You are charged for tokens that were produced. A request refused before a model sees it costs nothing.
Questions go to the Discord server or the Telegram channel. There is no support email.