Back to API Keys

API Reference

Programmatic access to Axion's forecasting platform.

Authentication

All endpoints require an API key passed as a Bearer token in the Authorization header:

Authorization: Bearer axn_sk_...

API keys are managed on the API Keys page. Keys are shown once at creation and cannot be retrieved later.

Base URL

https://axion-main-api-axion---productionus.us-east-1.gists.org

Credits

API usage is billed separately from the Axion monthly plan. Users pre-purchase credits before usage.

  • $1 = 100 credits
  • Minimum purchase: $50 (5,000 credits)
  • Credits are deducted per message based on token usage across all models
ModelInput rateOutput rateCached rate
Opus 4.77503,75075
Sonnet 4.64502,25045

Rates are per 1M tokens. A single thread may use multiple models (coordinator + agents), so costs accumulate across all calls. Negative balances are allowed to guarantee delivery of in-progress results.

Limits

  • Maximum 10 concurrent in-progress threads per user
POST/forecasts

Start a new forecast thread, or send a follow-up message to an existing one. Requires a positive API credit balance.

Request body

FieldTypeRequiredDescription
inputstringrequiredThe question or analysis prompt.
idstringoptionalExisting thread ID for follow-up messages.
max_forecastsintegeroptionalNumber of forecasts to generate (1-10). Default 1.
effortstringoptionalAnalysis depth: low, medium, or high. Default medium.
webhook_urlstringoptionalURL to receive a POST callback on completion or failure.
json
{
  "input": "Will NVIDIA's data center revenue exceed $40B in Q1 2026?",
  "max_forecasts": 3,
  "effort": "high"
}

Response 201

json
{
  "id": "thread_abc123",
  "input": "Will NVIDIA's data center revenue exceed $40B in Q1 2026?",
  "preliminary_result": null,
  "status": "starting"
}
GET/forecasts/{thread_id}

Poll the status and results of a forecast thread.

Status values

startingin_progresscompletedfailed

Response 200

json
{
  "id": "thread_abc123",
  "input": "Will NVIDIA's data center revenue exceed $40B in Q1 2026?",
  "preliminary_result": "Based on initial analysis...",
  "status": "completed",
  "result": "Final synthesis text...",
  "credits_consumed": 4231,
  "agents_progress": [
    { "slug": "web-search", "progress": 1.0, "turn": 12, "action": "done" },
    { "slug": "sec-filings", "progress": 1.0, "turn": 8, "action": "done" }
  ],
  "forecasts": [
    {
      "forecast_text": "NVIDIA data center revenue will exceed $40B in Q1 2026",
      "probability": 0.72,
      "confidence_lower": 0.55,
      "confidence_upper": 0.85,
      "resolution_date": "2026-07-15",
      "reasoning": "Based on current growth trajectory...",
      "concludes_at": "2026-07-15",
      "is_concluded": false,
      "outcome": null,
      "outcome_reasoning": null,
      "created_at": "2026-04-14T10:30:00Z"
    }
  ],
  "artifacts": [
    { "component_name": "RevenueChart", "props": "{\"data\": [...]}" }
  ]
}
GET/forecasts

List all forecast threads for your account.

Response 200

json
{
  "forecasts": [
    {
      "id": "thread_abc123",
      "input": "Will NVIDIA's data center revenue...",
      "status": "completed",
      "credits_consumed": 4231,
      "created_at": "2026-04-14T10:30:00Z"
    }
  ]
}
POST/forecasts/{thread_id}/stop

Cancel an in-progress forecast. Credits consumed up to cancellation are still charged.

Response 200

json
{ "success": true }
POST/forecasts/{thread_id}/share

Make a forecast thread publicly viewable. Returns a relative share URL.

Response 200

json
{ "success": true, "share_url": "/share/thread_abc123" }
POST/forecasts/{thread_id}/unshare

Revoke public access to a previously shared forecast thread.

Response 200

json
{ "success": true }
DELETE/forecasts/{thread_id}

Delete a forecast thread.

Response 200

json
{ "success": true }
GET/account/balance

Returns your current credit balance.

Response 200

json
{ "credits": 3750 }
POST/account/credits/purchase

Create a Stripe Checkout session for a one-time credit purchase. Minimum amount is $50.

Request body

json
{ "amount": 50 }

Response 200

json
{ "checkout_url": "https://checkout.stripe.com/c/pay/cs_..." }

Webhooks

If webhook_url is provided when creating a forecast, Axion sends a POST request to that URL when the thread reaches a terminal state (completed or failed). The payload matches the GET /forecasts/{thread_id} response.

Delivery is best-effort with up to 3 retries. Poll as a fallback if you need guaranteed delivery.

Errors

All errors return a JSON body with an error field:

json
{ "error": "insufficient credits" }
StatusMeaning
400Invalid request
401Invalid or missing API key
402Insufficient credits
404Thread not found
422Invalid request body
429Too many concurrent threads (max 10)
500Internal error

Example: poll until complete

python
import requests
import time

API_KEY = "axn_sk_..."
BASE = "https://axion-main-api-axion---productionus.us-east-1.gists.org"
headers = {"Authorization": f"Bearer {API_KEY}"}

# Create
r = requests.post(f"{BASE}/forecasts", headers=headers, json={
    "input": "Will the Fed cut rates in June 2026?",
    "effort": "high"
})
thread_id = r.json()["id"]

# Poll
while True:
    r = requests.get(f"{BASE}/forecasts/{thread_id}", headers=headers)
    data = r.json()
    print(f"Status: {data['status']}")
    if data["status"] in ("completed", "failed"):
        break
    time.sleep(5)

# Result
for f in data["forecasts"]:
    print(f"{f['forecast_text']}: {f['probability']}")

Eternis Inc.