REST API
Four endpoints. One trained model.
Same model that powers the Telegram bot, accessible via plain JSON over HTTPS. Bearer-token auth. 30 req/min per key.
GET /healthno auth requiredCheck if the API is up and which model is loaded.
POST
/queryGeneral-purpose query. Returns the model's response with the educational disclaimer appended.
Request body
prompt: string (required) — your question
tier: string — "fast" | "standard" | "deep" (default: standard)
Example response
{
"response": "MEV on Solana differs from Ethereum because...",
"model": "sovereign-v2:v6-sft",
"latency_ms": 2340
}curl
curl -X POST https://api.sovereignai.xyz/query \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"prompt":"Explain MEV on Solana"}'POST
/predictScenario-analysis for a ticker. Returns variables to watch, not a price target.
Request body
ticker: string (required) — e.g. SOL, BTC, ETH
timeframe: string — "5m" | "1h" | "4h" | "1d" (default: 1h)
context: string — optional: market context to include
Example response
{
"response": "Scenario framework for SOL 4h...",
"ticker": "SOL",
"timeframe": "4h"
}curl
curl -X POST https://api.sovereignai.xyz/predict \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"ticker":"SOL","timeframe":"4h","context":"validator outage concern"}'POST
/analyzeDeep-dive on a token or protocol.
Request body
token: string (required)
question: string — optional focus question
Example response
{
"response": "Jupiter's JUP governance covers..."
}curl
curl -X POST https://api.sovereignai.xyz/analyze \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"token":"JUP","question":"governance risks"}'POST
/sentimentScore arbitrary crypto text. Returns label + confidence + drivers.
Request body
text: string (required)
Example response
{
"score": -0.32,
"label": "mildly bearish",
"confidence": 0.71,
"drivers": ["crushed"],
"balanced_by": ["fundamentals intact"]
}curl
curl -X POST https://api.sovereignai.xyz/sentiment \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"text":"SOL getting crushed but fundamentals intact"}'Rate limits & tiers
- Free tier: 3 requests / day. No API key needed — hit the Telegram bot.
- Pro tier: 30 requests / minute. API key issued on payment.
- Enterprise: custom rate limits, SLA. Contact.
Errors
| Code | Meaning |
|---|---|
| 401 | Missing or invalid bearer token. |
| 429 | Rate limit exceeded. Retry after Retry-After seconds. |
| 503 | Model unavailable (GPU warming up or backend busy). Retry. |
| 504 | Inference timed out (>5 min). Your prompt may be too long. |