{"openapi":"3.1.0","info":{"title":"Fuel API","version":"1.0.0","description":"Compute market for AI agents. OpenAI-compatible chat and embeddings, paid from the agent's own wallet balance (USDC or SOL on Solana, USDG on Robinhood Chain). Sign in with the wallet to get a Bearer key. Errors: 402 top up or raise a limit; 403 account suspended, wallet refused by sanctions screening, or a Claude/GPT model not available in your region; 429 rate limited (per wallet, see Retry-After).","termsOfService":"https://fuelai.cloud/terms"},"servers":[{"url":"https://fuelai.cloud/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"fuel_sk_… key from POST /auth/keys"}},"responses":{"Error":{"description":"OpenAI-shaped error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}}}},"schemas":{"Message":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{}}},"Receipt":{"type":"object","properties":{"job_id":{"type":"string"},"provider":{"type":"string"},"price_usd":{"type":"number"},"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"latency_ms":{"type":"integer"},"attempts":{"type":"integer"}}}}},"security":[{"bearer":[]}],"paths":{"/auth/nonce":{"post":{"summary":"Get a message for the wallet to sign","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["wallet"],"properties":{"wallet":{"type":"string"}}}}}},"responses":{"200":{"description":"Nonce and message","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/auth/keys":{"post":{"summary":"Exchange the wallet's signature for an API key","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["wallet","nonce","signature"],"properties":{"wallet":{"type":"string"},"nonce":{"type":"string"},"signature":{"type":"string","description":"base58 or base64 ed25519 signature of the message"},"label":{"type":"string"}}}}}},"responses":{"201":{"description":"API key","content":{"application/json":{"schema":{"type":"object","properties":{"api_key":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}}}},"/chat/completions":{"post":{"summary":"Chat completion (OpenAI-compatible, streaming supported)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"max_tokens":{"type":"integer"},"stream":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OpenAI chat completion plus a `fuel` receipt","content":{"application/json":{"schema":{"type":"object","properties":{"fuel":{"$ref":"#/components/schemas/Receipt"}}}}}},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/messages":{"post":{"summary":"Anthropic Messages format (Claude SDK compatible): any Fuel model, streaming and tools","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages","max_tokens"],"properties":{"model":{"type":"string"},"messages":{"type":"array"},"max_tokens":{"type":"integer"},"system":{},"stream":{"type":"boolean"},"tools":{"type":"array"}}}}}},"responses":{"200":{"description":"Anthropic message (plus a `fuel` receipt)","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/embeddings":{"post":{"summary":"Embeddings (OpenAI-compatible)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string"},"input":{}}}}}},"responses":{"200":{"description":"OpenAI embeddings plus a `fuel` receipt","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/images/generations":{"post":{"summary":"Pictures (OpenAI shape), priced per picture; temporary URLs (about an hour)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string"},"prompt":{"type":"string","maxLength":2000},"n":{"type":"integer","minimum":1,"maximum":4},"size":{"type":"string","enum":["1024x1024","768x1344","1344x768"]}}}}}},"responses":{"200":{"description":"data[].url plus a `fuel` receipt","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/videos":{"post":{"summary":"Start a short video clip; poll /videos/{id}. Priced per clip, charged when ready","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string"},"prompt":{"type":"string","maxLength":2000}}}}}},"responses":{"202":{"description":"Started: id, poll url, held_usd"},"400":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/videos/{id}":{"get":{"summary":"Clip status: in_progress (stage), completed (url, receipt) or failed","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/3d":{"post":{"summary":"Start a 3D model (GLB) from a prompt; poll /3d/{id}. Priced per model","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string"},"prompt":{"type":"string","maxLength":2000}}}}}},"responses":{"202":{"description":"Started: id, poll url, preview_url"},"400":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/3d/{id}":{"get":{"summary":"3D job status: completed has a temporary GLB url and the receipt","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/audio/speech":{"post":{"summary":"Text to speech (OpenAI shape), priced per 1,000 characters. Returns audio, or JSON with response_format url","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string"},"input":{"type":"string","maxLength":5000},"voice":{"type":"string"},"response_format":{"type":"string","enum":["url"]}}}}}},"responses":{"200":{"description":"Audio bytes (x-fuel-receipt header) or { url, fuel }","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"}}}},"/audio/transcriptions":{"post":{"summary":"Speech to text (OpenAI shape, multipart file up to 4 MB). Charged per minute of audio","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"model":{"type":"string","default":"openai/whisper"}}}}}},"responses":{"200":{"description":"{ text, fuel }","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"}}}},"/classifications":{"post":{"summary":"Zero-shot classification on the laptop lane (texts + labels embedded by two cross-checking laptops; labels ranked by similarity)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input","labels"],"properties":{"input":{},"labels":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":20},"hypothesis_template":{"type":"string","description":"Sentence per label, default 'This text is about {}.'"},"model":{"type":"string","enum":["fuel-lane/bge-small-en-v1.5"]}}}}}},"responses":{"200":{"description":"Best label and ranked scores per text, plus a `fuel` receipt","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/models":{"get":{"summary":"Models with Fuel's price per 1M tokens","security":[],"responses":{"200":{"description":"Model list","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/market":{"get":{"summary":"Market rates: what agents pay and the price sellers must beat","security":[],"responses":{"200":{"description":"Rates","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/index":{"get":{"summary":"Fuel Compute Index","security":[],"parameters":[{"name":"days","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Index","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/account":{"get":{"summary":"Balance, limits, deposit address","responses":{"200":{"description":"Account","content":{"application/json":{"schema":{"type":"object"}}}}}},"patch":{"summary":"Set spending limits","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"daily_usd":{"type":["number","null"]},"per_job_usd":{"type":["number","null"]}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/account/budget":{"post":{"summary":"Set spending limits in plain words, e.g. \"at most $5 a day, no job over 10 cents\", \"remove the daily limit\", \"pause spending\". Limits are per UTC day and per job; dry_run only shows what Fuel understood","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":300},"dry_run":{"type":"boolean"}}}}}},"responses":{"200":{"description":"What Fuel understood, and the limits after the change","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/topups/usdg":{"get":{"summary":"USDG on Robinhood Chain: chain id, USDG contract, Fuel's deposit address","security":[],"responses":{"200":{"description":"Deposit details","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Confirm a USDG top-up by transaction hash; the sending EVM wallet is credited 1:1","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tx_hash"],"properties":{"tx_hash":{"type":"string"}}}}}},"responses":{"200":{"description":"Credited","content":{"application/json":{"schema":{"type":"object"}}}},"409":{"$ref":"#/components/responses/Error"}}}},"/topups":{"post":{"summary":"Confirm a USDC/SOL deposit by transaction signature","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["signature"],"properties":{"signature":{"type":"string"}}}}}},"responses":{"200":{"description":"Credited","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/faucet/claim":{"post":{"summary":"Claim the free trial credits (any wallet, once)","responses":{"200":{"description":"Claimed","content":{"application/json":{"schema":{"type":"object"}}}},"409":{"$ref":"#/components/responses/Error"}}}},"/jobs":{"get":{"summary":"Your receipts (never job content)","responses":{"200":{"description":"Receipts","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/credits":{"get":{"summary":"Compute credits: each tier's price per credit and status; with a key, your credits","responses":{"200":{"description":"Credits","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/credits/tiers":{"get":{"summary":"Credit tiers (max, pro, open, lane): price per credit and tokens one credit buys on each model (at least 1M at 3:1 input:output)","security":[],"responses":{"200":{"description":"Tiers","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/credits/buy":{"post":{"summary":"Buy credits of a tier from your balance (opens after the Fuel token launch); jobs on the tier's models then use them automatically (header x-fuel-credits: off to pay from balance instead)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tier","credits"],"properties":{"tier":{"type":"string","enum":["max","pro","open","lane"]},"credits":{"type":"number","minimum":0.01}}}}}},"responses":{"201":{"description":"Bought (with tokens per model)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/credits/convert":{"post":{"summary":"Convert credits into a cheaper tier's credits of the same month, at the price ratio minus a fee","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["series","to_tier","credits"],"properties":{"series":{"type":"string","example":"2026-12-max"},"to_tier":{"type":"string","enum":["max","pro","open","lane"]},"credits":{"type":"number"}}}}}},"responses":{"200":{"description":"Converted","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/credits/market":{"get":{"summary":"Credit market: each series (month × tier) with value, bid/ask, last price","security":[],"responses":{"200":{"description":"Market","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/credits/market/{series}":{"get":{"summary":"Order book and recent trades of a series, e.g. 2026-12-pro","security":[],"parameters":[{"name":"series","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Book","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"$ref":"#/components/responses/Error"}}}},"/credits/orders":{"get":{"summary":"Your credit orders and trades","responses":{"200":{"description":"Orders","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Limit order: trades at once against matching orders at their price; the rest waits on the book","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["series","side","price_usd","credits"],"properties":{"series":{"type":"string"},"side":{"type":"string","enum":["buy","sell"]},"price_usd":{"type":"number"},"credits":{"type":"number"}}}}}},"responses":{"201":{"description":"Placed","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/credits/orders/{id}":{"delete":{"summary":"Cancel an open order","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/credits/rules":{"get":{"summary":"Your standing credit rules and what each last did","responses":{"200":{"description":"Rules","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Add a rule Fuel runs every 5 minutes: keep_min (auto-buy up to a target at a max price) or sell_before_expiry (list at a min price N days before expiry)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind","tier"],"properties":{"kind":{"type":"string","enum":["keep_min","sell_before_expiry"]},"tier":{"type":"string","enum":["max","pro","open","lane"]},"min_credits":{"type":"number"},"target_credits":{"type":"number"},"max_price_usd":{"type":"number"},"days_before":{"type":"integer"},"min_price_usd":{"type":"number"}}}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/credits/rules/{id}":{"delete":{"summary":"Delete a rule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"$ref":"#/components/responses/Error"}}}},"/payouts":{"get":{"summary":"Earnings (seller and laptop-lane income): what you can withdraw, the minimum, payout history","responses":{"200":{"description":"Payouts","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Request a USDC payout of earnings to your wallet (deposits can't be withdrawn); paid after review","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount_usd"],"properties":{"amount_usd":{"type":"number"}}}}}},"responses":{"201":{"description":"Requested","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/payouts/{id}/cancel":{"post":{"summary":"Cancel your payout before it's approved (refunds the balance)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/credits/tokens":{"get":{"summary":"Credit tokens (SPL, one mint per series: month × tier): on/off, network, mints; with a key, your bridge history","security":[],"responses":{"200":{"description":"Token info","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/credits/tokens/withdraw":{"post":{"summary":"Withdraw credits of a series to your wallet as SPL tokens (deposit them back before expiry)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["series","credits"],"properties":{"series":{"type":"string"},"credits":{"type":"number"}}}}}},"responses":{"201":{"description":"Minted","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/credits/tokens/deposit-tx":{"post":{"summary":"Unsigned transaction burning your credit tokens (sign and send it, then call /credits/tokens/deposit)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["series","credits"],"properties":{"series":{"type":"string"},"credits":{"type":"number"}}}}}},"responses":{"200":{"description":"Base64 transaction","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"}}}},"/credits/tokens/deposit":{"post":{"summary":"Credit a burn of credit tokens back to the burning wallet","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["series","signature"],"properties":{"series":{"type":"string"},"signature":{"type":"string"}}}}}},"responses":{"201":{"description":"Credited","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/status":{"get":{"summary":"System status","security":[],"responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}