Inference

Run a single forecasting prediction

Submit a forecasting question and receive a typed structured prediction.

The model returns:

  • question_type — binary, multiple_choice, numeric, or date
  • predicted_answer — Yes/No, top option, or median estimate
  • confidence — probability (0–1) for binary and multiple-choice answers
  • options — per-option probabilities for multiple-choice questions
  • range_forecast — p10/p50/p90 bounds for numeric and date questions
  • rationale — 2–4 sentence explanation
  • evidence_sources — news articles used as context
  • market_analysis — model-vs-market edge when market_probability is provided

Choosing a variant

Start with variant0_neutral_baseline (the default). Switch to other variants to inject additional structure into the prompt — for example, variant3_reasoning_type asks the model to identify whether the prediction is based on speculation, an expert forecast, or a stated plan.

Providing your own evidence

Pass pre-fetched articles in news_articles to use them directly. Leave the list empty to trigger automatic news retrieval (if the evidence pipeline is configured on the server).

Example — binary request

curl -X POST /predict \
  -H "Content-Type: application/json" \
  -d '{
    "question": "Will oil prices exceed $100 per barrel in 2026?",
    "question_type": "binary",
    "market_platform": "Kalshi",
    "market_probability": 0.31
  }'

Example — multiple choice

curl -X POST /predict \
  -H "Content-Type: application/json" \
  -d '{
    "question": "Who will win the 2026 Formula 1 drivers championship?",
    "question_type": "multiple_choice",
    "options": ["Max Verstappen", "Lando Norris", "Charles Leclerc", "Lewis Hamilton", "Other"],
    "attach_evidence": false
  }'

Example — numeric forecast with context

curl -X POST /predict \
  -H "Content-Type: application/json" \
  -d '{
    "question": "What will US CPI inflation be in December 2026?",
    "question_type": "numeric",
    "resolution_criteria": "Use the year-over-year CPI-U inflation rate for December 2026.",
    "categories": ["Economics", "United States"],
    "variant": "variant5_key_conditions"
  }'
post/predict

Request

  • Base URL: https://foresea.ink (the document declares no server; this is the origin it was published from)
  • URL: https://foresea.ink/predict
  • Auth: none declared

Query parameters

kb_user_idstring nullable

Request body

questionstring required

The forecasting question to evaluate. It should ask about a future or otherwise resolvable event, option, quantity, or date.

descriptionstring

Extended background context that clarifies what the question is asking.

resolution_criteriastring

Full venue conditions and measurement source used to resolve the forecast.

categoriesstring[]

Topic tags (e.g. ['Economics', 'United States']).

variantstring

Prompt variant that controls the reasoning instruction style. See the variant table in the Overview section.

attach_evidenceboolean

If true, fetch live evidence and merge it with any supplied articles.

evidence_top_kinteger

Maximum number of evidence articles to retrieve (1–100).

evidence_detailstring

Evidence detail level in the model prompt. Use summary for scheduled multi-model runs to keep prompts bounded; default full preserves the interactive API behaviour.

created_timestring nullable

ISO 8601 question creation time.

publish_timestring nullable

ISO 8601 question publish time.

resolve_timestring nullable

ISO 8601 resolution deadline.

days_openinteger nullable

Days the question has been open.

historyobject[]

Prior conversation turns for multi-turn context, oldest first. Each item is {"role": "user"|"assistant", "content": "..."}.

conversation_steerstring

Optional per-conversation steering instruction for tone, emphasis, or analytical stance. It cannot override safety rules or response contracts.

question_typestring nullable

Question type: binary, multiple_choice, numeric, or date. Set this explicitly for API clients; auto-detected from the question when omitted.

optionsstring[]

Candidate answers for multiple_choice questions (optional; the model can infer them).

market_platformstring nullable

Prediction market venue, e.g. Polymarket, Kalshi, Manifold, or Metaculus.

market_urlstring nullable

URL for the prediction market being analyzed. Must start with http:// or https://.

market_outcomestring nullable

Outcome whose market-implied probability is provided. Defaults to Yes for binary markets; set this to No or to a multiple-choice option label when needed.

market_identstring nullable

Venue market id (Polymarket slug / Kalshi ticker). Lets Foresea fetch live odds when market_probability is omitted.

market_probabilitynumber nullable

Current market-implied probability for market_outcome. Use 0-1, or pass a percentage from 0-100 and Foresea will normalize it. When omitted but the market is identifiable (market_url or market_platform+market_ident), Foresea fetches the current live odds.

market_volumenumber nullable

24-hour trading volume in USD. Populated automatically from live odds when the market is identifiable.

market_liquiditynumber nullable

Total open interest / liquidity in USD. Populated automatically from live odds.

market_price_change_24hnumber nullable

Price change in the last 24 hours (in probability points, -1..1). Populated automatically from live odds.

market_bidnumber nullable

Current best bid (YES) in probability units (0..1). Kalshi only; Polymarket uses the mid price.

market_asknumber nullable

Current best ask (YES) in probability units (0..1). Kalshi only.

market_last_trade_pricenumber nullable

Last actual trade price (0..1). More reliable than resting bid/ask in thin markets. Populated automatically.

market_price_change_7dnumber nullable

7-day price change in probability points (-1..1). Reveals slow drift that 24h misses. Populated automatically.

market_resolution_sourcestring nullable

Who resolves the market (e.g. UMA oracle, Kalshi team). Affects how much to trust the market price.

market_no_sub_titlestring nullable

What the NO outcome represents (Kalshi). Useful when the question wording is ambiguous.

market_expected_expiration_timestring nullable

When the venue expects to settle (Kalshi). May differ from trading close date.

market_floor_strikeunknown
market_cap_strikeunknown
market_price_historyobject[] nullable

Recent price points for this market, newest first. Each entry: {ts: ISO timestamp, probability: float 0..1, volume?: float, liquidity?: float, bid?: float, ask?: float}. Up to 8 entries. Shown to the model as market-trajectory context so it can detect price and tradability changes that the current price alone would hide.

forecast_historyobject[] nullable

Prior Foresea forecast snapshots for the same market, newest first. Used by scheduled re-forecasts so repeat forecasts are stateful updates, not independent stateless calls.

openrouter_api_keystring nullable

User-supplied OpenRouter API key. When set, this request is routed through OpenRouter using openrouter_model instead of the server's default provider.

openrouter_modelstring nullable

OpenRouter model ID (e.g. openai/gpt-4o, anthropic/claude-3.5-sonnet).

modelstring nullable

Optional alternate server-hosted model to forecast with, from the SCADS allowlist (for example gpt-oss-120b, scads-alias-reasoning, kimi-k2.7-code). Uses the server's own key — no BYOK needed. Powers the multi-model paper-trading comparison.

provider_base_urlstring nullable

Optional OpenAI-compatible chat-completions endpoint (e.g. https://api.openai.com/v1/chat/completions). When set with openrouter_api_key + openrouter_model, the request goes to your own endpoint instead of OpenRouter. Must be public HTTPS.

chat_modeboolean

When true, skips the forecast output template entirely. The model responds in plain natural language with no structured JSON.

effort_tier'simple' | 'standard' | 'deep' nullable

How much reasoning effort the model call uses, when the provider supports it (best-effort; unsupported providers ignore it). Set explicitly to override; left unset, no reasoning-effort hint is sent.

max_tokensinteger nullable

Optional per-request generation cap. The server still clamps this to its configured model limit.

ollama_base_urlstring nullable

Base URL of an Ollama instance, e.g. http://localhost:11434. No API key required. Cloud-metadata hosts are blocked; for foresea.ink the instance must be reachable from the server.

Example request

{
  "market_platform": "Polymarket",
  "market_probability": 0.54,
  "question": "Will the Federal Reserve cut interest rates at least once before the end of 2025?",
  "question_type": "binary"
}

Response

Prediction returned successfully.

question_typestring

Detected type: binary, multiple_choice, numeric, or date.

predicted_answerstring nullable

Headline answer: Yes/No, the top option, or the median estimate.

confidencenumber nullable

Confidence in the headline answer (binary/MC). Null for numeric.

model_probabilitynumber nullable

Explicit model probability for conversational forecasts, when one was provided.

rationalestring nullable

2–4 sentence explanation of the prediction.

model_rationalestring nullable

Raw rationale as returned by the model (may differ from rationale after post-processing).

variantstring required

Prompt variant used for this prediction.

model_keystring required

Model identifier (e.g. gpt-oss-120b).

served_model_namestring nullable

Exact upstream model name that served the response, if reported by the provider.

evidence_errorstring nullable

Non-null if evidence retrieval failed (prediction still returned).

complexitystring nullable

Model's own self-reported difficulty for this question: low or high.

bull_factorsobject[] nullable

Decomposed factors favoring the YES / upside outcome.

bear_factorsobject[] nullable

Decomposed counter-factors favoring the NO / downside outcome.

key_catalystsobject[] nullable

Key upcoming events/dates that could trigger thesis revision.

Example response

{
  "confidence": 0.72,
  "evidence_articles": [],
  "evidence_sources": [
    {
      "publish_date": "2025-01-15T10:30:00Z",
      "relevance_score": 0.91,
      "source": "Reuters",
      "title": "Fed signals rate cuts may slow in 2025",
      "url": "https://reuters.com/example"
    }
  ],
  "market_analysis": {
    "edge": 0.18,
    "market_probability": 0.54,
    "market_url": "https://polymarket.com/event/example",
    "model_probability": 0.72,
    "outcome": "Yes",
    "platform": "Polymarket",
    "stance": "model_above_market",
    "summary": "Foresea is 18 percentage points above the market on Yes."
  },
  "model_key": "gpt-oss-120b",
  "model_rationale": "Current Fed guidance suggests rates will remain elevated through mid-2025.",
  "options": [],
  "predicted_answer": "No",
  "question_type": "binary",
  "rationale": "Current Fed guidance suggests rates will remain elevated through mid-2025. Recent inflation data remains above the 2% target, reducing the likelihood of a cut in the near term. However, slowing economic growth introduces some downside risk that could prompt a cut by year-end.",
  "served_model_name": "openai/gpt-oss-120b",
  "variant": "variant0_neutral_baseline"
}

Changes

No recorded changes to this operation across all 1 revision of this API.