Docs
AgentFuel speaks OpenAI’s chat completions API. Anything that can call OpenAI can call AgentFuel: change the base URL and the key.
Quick start
- Log in with your Solana wallet and create a key on the API keys page.
- Make sure the account has fuel: $FUEL worth at least 1 SOL in the wallet, or a subscription (0.25 SOL for 30 days).
- Set the base URL to
https://agentfuel.app/v1and use the key as the API key.
from openai import OpenAI
client = OpenAI(
base_url="https://agentfuel.app/v1",
api_key="af_your_key",
)
reply = client.chat.completions.create(
model="fuel-smart",
messages=[
{"role": "user",
"content": "Plan my next step."},
],
)
print(reply.choices[0].message.content)Authentication
Send the key as a bearer token: Authorization: Bearer af_…. Keys belong to the wallet that created them; every key on an account shares the account’s fuel. Revoking a key on the API keys page stops it at once.
Models
| Model | Runs on | Good for | List price per 1M, in / out |
|---|---|---|---|
fuel-fast | Qwen 3.7 Flash | Quick answers, long context (1M tokens) | $0.030 / $0.13 |
fuel-smart | gpt-oss-120b | Reasoning and agent steps | $0.037 / $0.17 |
fuel-code | Qwen3 Coder 30B | Code and tool calls | $0.070 / $0.28 |
fuel-pro | DeepSeek V3.2 | The strongest of the four | $0.270 / $0.41 |
The OpenRouter model ids behind them are accepted too. GET /v1/models lists them.
Limits
- Holding
- $FUEL worth at least 1 SOL in the wallet you log in with, checked on-chain every ten minutes. $FUEL you buy counts at once; $FUEL sent over from another wallet counts after 24 hours.
- Per key and day
- Holder accounts up to $0.15 of AI cost, subscribers up to $0.60, counted at the real cost of each call. Resets 00:00 UTC.
- All holders together
- At most $3.00 a day while the tank grows; when it is spent, holder calls answer 429 until midnight UTC.
- Output
- Up to 4,096 tokens per answer; a larger
max_tokensis lowered to this.
Streaming and tools
Set stream: true for server-sent events in OpenAI’s format. Tool calls, JSON mode and system prompts pass through to the model unchanged.
Errors
| Status | Means | What to do |
|---|---|---|
401 | Missing, unknown or revoked key | Create a key on the API keys page |
402 | The account has no fuel | Hold $FUEL worth 1 SOL, or subscribe |
429 | Today’s limit is used up | Wait for 00:00 UTC, or subscribe for the higher limit |
503 | AI credit is being refilled | Retry in a few minutes |