# Ephemeris: full reference for LLMs and agents > Ephemeris is a time-series forecasting API: a hosted API for time-series foundation models (TSFMs). Send numeric history, get probabilistic (quantile) forecasts back from a panel of open-weights zero-shot foundation models. Use it over REST or as a remote MCP server. Base URL: https://ephemeris.cascade.industries ## What it does Ephemeris runs a panel of pretrained time-series foundation models behind one endpoint: - Chronos-2 (Amazon) - TimesFM 2.5 (Google) - Toto 2 (Datadog) - TiRex-2 (NX-AI) - Timestral 209M (Mistral AI) - T0 Gamma (The Forecasting Company) - IBM Granite PatchTST-FM and FlowState The exact panel changes over time; `GET /api/v1/models` (or the MCP tool `list_models`) is the source of truth for model names, health, capabilities, horizon limits and prices. Per-model pages (size, licence, capabilities, how to call each by name): https://ephemeris.cascade.industries/models Nothing is trained on your data. You send history, you get forecasts back at the quantile levels you ask for (for example the 10th, 50th and 90th percentiles), so every forecast carries its own uncertainty band. ## When to use it, and when not to Use Ephemeris when: - the task needs a forecast of a numeric series: demand, sales, web traffic, energy load, prices, sensor readings, operational metrics; - uncertainty matters (planning ranges, risk, capacity), not just a single line; - the user can supply the history (at least a few dozen points; more is better). Do not use it: - to fill in or invent missing history: send only the values you have; - for non-numeric or categorical prediction, classification, or text; - speculatively or in a loop without the user's intent: every successful forecast spends credits. ## Authentication Every endpoint takes an API key as a bearer token: Authorization: Bearer pc_live_... Create keys in the dashboard after signing up at https://ephemeris.cascade.industries/sign-up. Keys are shown once. Use a separate key per agent or integration and revoke keys you no longer use: anyone holding a key can spend its account's credits. ### Getting a key from a terminal or agent (device flow) A CLI or agent can get a key without the person copying it, and without the key passing through a conversation: the OAuth 2.0 device authorization grant (RFC 8628), like `gh auth login`. 1. POST /api/v1/device/code with `{"client": "my-agent", "name": "my-agent on laptop"}` (no API key). `client` is a short lowercase name; `name` is what the approval page shows and what the new key is called. The response has `device_code` (secret, keep it in the tool), `user_code` (e.g. `WDJB-MJHT`), `verification_uri_complete`, `expires_in` (600) and `interval` (5). 2. Show the person `user_code` and open `verification_uri_complete`. They sign in or sign up, check the page shows the same code, and approve. 3. Every `interval` seconds, POST /api/v1/device/token with `{"device_code": "..."}`. HTTP 400 `{"error": "authorization_pending"}`: keep waiting. `slow_down`: add 5 seconds to the interval. `access_denied` or `expired_token`: stop. HTTP 200 `{"key": "pc_live_..."}`: done; the key is returned once. The key is listed on the dashboard API keys page under `name` and can be revoked there. Each network may start 10 sign-ins per 10 minutes (HTTP 429 after that). ## Endpoints - POST /api/v1/forecast: forecast one or more series - GET /api/v1/models: live panel, capabilities, horizon limits, ensemble weights, prices - GET /api/v1/balance: spendable credits (excludes credits reserved by in-flight forecasts) - GET /api/v1/usage: request history - POST /api/v1/feedback: optional and free; `{"request_id": , "actuals": [one realized path per series, in order]}` for one of your own forecasts, used to tune ensemble weights and routing. Unknown, expired (the provider keeps recent requests only) or other accounts' ids return 404 - POST /api/v1/device/code: start a sign-in from a terminal or agent (no API key) - POST /api/v1/device/token: poll it; returns a new API key once approved OpenAPI: https://ephemeris.cascade.industries/openapi-m1.json ## Forecast request curl --request POST \ --url https://ephemeris.cascade.industries/api/v1/forecast \ --header "Authorization: Bearer pc_live_your_key" \ --header "Content-Type: application/json" \ --header "Idempotency-Key: forecast-2026-10-02-001" \ --data '{ "mode": "route", "series": [{ "values": [100.2, 101.4, 99.8, 103.1, 104.6, 102.2], "freq": "H" }], "horizon": 24, "quantiles": [0.1, 0.5, 0.9] }' Fields: - `mode` (required): `route`, `ensemble` or `explicit` - `route`: Ephemeris picks the best-suited model for the data. The cheapest good default when you are unsure. - `ensemble`: runs every compatible model and combines them into one forecast, weighting the more accurate models more. Additional model calls increase cost; calibrated coverage on a new series is not established. - `explicit`: runs the single model named in `model`. - `model`: required in explicit mode; must be a name from `/api/v1/models`. - `series` (required): 1 to 64 entries, each with: - `values`: oldest first. A flat array of numbers is one univariate series. An array of equal-length arrays is one multivariate series (one inner array per variate). - `freq` (optional, recommended): pandas-style frequency such as "5min", "H", "D", "W", "M". Improves routing and seasonal handling. - `covariates` (optional): see Covariates below. - `horizon`: steps to forecast, 1 to 4096 (default 64), subject to model limits and the 120,000 output-value budget. - `quantiles`: up to 21 levels strictly between 0 and 1 (for example [0.1, 0.5, 0.9]). - `context_len`: most recent points per variate to use (history length does not affect pricing), 1 to 16384 (default 256). Longer inputs are truncated to a model's context cap. - `combine` (ensemble only): `mixture` (default; pools the models' predictive distributions) or `vincentize` (averages quantiles). Prefer `mixture`. - `top_k` (ensemble only): cap on how many models participate, 1 to 16. Limits: at most 64 series and 256 slots per request, where a slot is one variate of one series. ## Forecast response { "forecasts": [ { "quantiles": { "0.1": [103.8, 104.1, 104.5], "0.5": [105.2, 105.7, 106.1], "0.9": [106.9, 107.4, 108.0] } } ], "meta": { "gateway_request_id": "req_01J...", "request_id": "model_01J...", "models_used": ["chronos2"], "model_revisions": { "chronos2": "3f9c1e0a..." }, "billing": { "settled_mc": "12", "balance_mc": "4988" } } } - `forecasts` has one entry per input series, in order. Each maps a quantile level (as a decimal string) to `horizon` values; a multivariate series returns one inner array per variate. - `meta.models_used` lists the models that contributed; `meta.notes` explains any model that was skipped or dropped. - `meta.billing.settled_mc` is what this call cost; `balance_mc` is what remains. ## Covariates Each series may carry covariates: "covariates": { "past": { "temperature": [ ...same length as values... ] }, "future": { "temperature": [ ...exactly horizon values... ] } } - `past` holds observed history, aligned with `values`. `future` holds values known in advance over the forecast horizon (a planned price, a holiday flag, a weather forecast). Every `future` key must also appear in `past`. Up to 16 covariates per series. - Only models with `covariates: true` in `/api/v1/models` use them. In `route` and `ensemble` mode the panel narrows to those models. In `explicit` mode, naming a model without covariate support is an error. ## Horizon limits Horizons go up to 4096 sampling steps, subject to the 120,000 output-value budget (total variates × horizon × quantile count; 21 quantiles when omitted). `/api/v1/models` reports two limits per model: - `max_horizon`: the longest horizon the model can forecast at all (null means no limit). Past it the model is skipped in every mode, and naming it in `explicit` mode is an error. - `auto_max_horizon`: the longest horizon at which `route` and `ensemble` use the model (null means no limit beyond `max_horizon`). Past it the model sits out of automatic selection because the panel is more accurate without it there, but you can still name it in `explicit` mode. TiRex-2 has `auto_max_horizon` 320: its head emits 320 steps per pass and longer horizons are rolled out the way TiRex does it. When a model is skipped for horizon, `meta.notes` says so. ## Accuracy Scored with each benchmark's own harness (our runs, not leaderboard submissions), as ratios to seasonal naive, lower is better: - TIME: ensemble MASE 0.639 / CRPS 0.538, against 0.638 / 0.536 for the leading model (QiYao-M) and 0.640 / 0.536 for TimesFM-3; the best average MASE rank of the 31 models. - GIFT-Eval (97 configurations): ensemble CRPS 0.4459 / MASE 0.6580. Better than every model in the panel and than published leaderboard entries such as TimesFM-3 (0.4557), Toto-2.0 2.5B (0.4759), TiRex-2 zero-shot (0.4781) and Chronos-2 (0.4854). Ours is our own run (25 November 2026), not a leaderboard submission. - The ensemble beats its best single member on all four benchmarks (CRPS, % worse for the best member): BOOM +2.1% (Timestral 209M), fev-bench +2.0% (Timestral 209M), GIFT-Eval +1.4% (T0 Gamma), TIME +0.4% (Timestral 209M). Full tables: https://ephemeris.cascade.industries/benchmarks ## Retries and idempotency Send an `Idempotency-Key` header (8 to 128 letters, digits, dot, underscore, colon or hyphen). Retrying an identical request with the same key replays the stored result without charging again; reusing a key with a different body is a 409. ## Pricing Prepaid credits; 1 credit = 1,000 millicredits ("mc"). A forecast's cost is, per model run: price_per_kslot_mc x slots x ceil(horizon / 64) History length has no multiplier; model input limits still apply. A slot is one target variate, so multivariate inputs count each target separately. `billing_context_cap` is a legacy field and is null; `billing_horizon_steps` is 64. Existing saved results and idempotency replays retain their original charges. The price per model comes from `/api/v1/models`. You pay for the models that actually ran: one in explicit mode, usually one in route mode (more if it falls back to a small ensemble), every compatible model in ensemble mode. Ensemble mode is billed at a flat 5,000 mc (5 credits) x slots x ceil(horizon / 64) however many models it blends, capped at the sum of the models that ran. Credits are reserved when a forecast starts and settled from what ran. Top-ups: $10 buys 10,000 credits, $25 buys 30,000, $100 buys 200,000. Per-model rates and dollar costs: https://ephemeris.cascade.industries/pricing ## Errors - 400: invalid request (the message says which field and why) - 401: missing, invalid or revoked API key - 402: insufficient credits; top up using the returned topup_url, then retry - 409: idempotency key in progress, or reused with a different body - 429: rate limited; retry after the number of seconds in Retry-After. The limit is 10 tokens a minute (burst 20); a forecast spends 1 token, an ensemble up to 4 (fewer with top_k) - 503: forecasting temporarily unavailable; retry with backoff ## MCP server (for AI agents) Ephemeris is also a remote MCP server (Streamable HTTP): URL: https://ephemeris.cascade.industries/api/mcp Header: Authorization: Bearer pc_live_your_key Tools: - `forecast`: the paid pipeline from POST /api/v1/forecast. Choose and retain `idempotency_key` before submission; replay depends on server retention, so expired keys may charge again. Returns existing `forecasts`/`meta` plus `artifact` (ephemeris.forecast v1) and an embedded JSON attachment by default. `include_artifact: false` retains response-only behavior. Optional `context` holds local units/time/target metadata and is never sent to the models. Full submitted history is included: save it client-side. Artifacts over 1 MiB or the 3 MiB result budget return `artifact_status: unavailable` without discarding the paid response. - `describe_forecast`: pass `{artifact: }` for deterministic scope/result/basis/limitations/references, without new inference. Billing strings are millicredits (1000 mc = 1 credit). No calibrated coverage, cumulative intervals or peak probabilities can be inferred from marginal quantiles alone. - `plot_forecast`: pass `{artifact: , format: "png"}` for an inline image, or format "svg" for an embedded SVG resource. No new inference or forecast charge. Default recent history is max(24, 2*horizon), capped by available observations; `history: "all"` shows all. Select `series_index`/`variate_index` for multiple results. Requires an existing median q0.5; missing/crossed values are not invented. These hosted tools receive artifact data over the network, require an API key, and do not read local paths or fetch URLs. Saved-artifact input limit is 1 MiB; rendered output limit is 2 MiB. Resource URNs identify inline attachments, not persistent storage or downloadable web URLs. Preview/save support depends on the client. Missing labels may be corrected in a COPY of local artifact context without another paid forecast; keep request/response unchanged. Missing future inputs mean not supplied, not assumed zero or no events. - `list_models`: the live panel with capabilities (multivariate, covariates, max_horizon), ensemble weights by horizon, served weight revisions and prices. Call it before using explicit mode. - `get_balance`: spendable credits. - `get_usage`: recent request history. Claude Code: claude mcp add --transport http ephemeris https://ephemeris.cascade.industries/api/mcp \ --header "Authorization: Bearer pc_live_your_key" Cursor (~/.cursor/mcp.json): { "mcpServers": { "ephemeris": { "url": "https://ephemeris.cascade.industries/api/mcp", "headers": { "Authorization": "Bearer pc_live_your_key" } } } } VS Code (.vscode/mcp.json, prompts for the key so it never lands in the repository): { "inputs": [{ "type": "promptString", "id": "ephemeris-key", "description": "Ephemeris API key", "password": true }], "servers": { "ephemeris": { "type": "http", "url": "https://ephemeris.cascade.industries/api/mcp", "headers": { "Authorization": "Bearer ${input:ephemeris-key}" } } } } Claude Desktop (claude_desktop_config.json, through the mcp-remote bridge): { "mcpServers": { "ephemeris": { "command": "npx", "args": ["-y", "mcp-remote", "https://ephemeris.cascade.industries/api/mcp", "--header", "Authorization:${EPHEMERIS_AUTH}"], "env": { "EPHEMERIS_AUTH": "Bearer pc_live_your_key" } } } } Claude API (Messages API MCP connector, beta header `mcp-client-2025-11-20`): { "model": "claude-opus-5-5", "max_tokens": 16000, "mcp_servers": [{ "type": "url", "url": "https://ephemeris.cascade.industries/api/mcp", "name": "ephemeris", "authorization_token": "pc_live_your_key" }], "tools": [{ "type": "mcp_toolset", "mcp_server_name": "ephemeris" }], "messages": [{ "role": "user", "content": "Forecast the next 12 points of 3,5,4,6,7,6,8,9,8,10" }] } Clients that only speak stdio can use the same bridge: `npx mcp-remote --header "Authorization: Bearer "`. ## Guidance for agents 1. Call `list_models` once per session; model names and limits come from the live panel, not from memory. 2. Prefer `route` when unsure, `ensemble` when combining eligible models is desired and its additional cost is acceptable, `explicit` only when the user names a model. 3. In explicit mode, check the model supports the request: its `covariates` flag if you send covariates, its `max_horizon` against your horizon, and `multivariate` for multivariate series. 4. Send only the history the user gave you. Pass `freq` when you know it. 5. Report the quantile band, not only the median: the spread is the uncertainty. 6. Use an idempotency key on retries; never loop forecasts without the user's intent. ## Client updates and CLI availability Hosted MCP updates are automatic on the server. Start a new conversation or reconnect to refresh cached tool lists; no npm bridge upgrade is required just to discover added hosted tools. Clients must support Streamable HTTP. In HeyDitto, expanding Settings → MCP Servers fetches tools, but its documentation currently states SSE-only; verify compatibility in the actual client. Ephemeris CLI 0.5.1 is published as `ephemeris-cli` on npm. Install with `npm install --global ephemeris-cli@0.5.1`, or use `npx --yes --package ephemeris-cli@0.5.1 ephemeris --help`. Begin with `ephemeris --help`, then `ephemeris forecast run --help` and `ephemeris schema forecast`. Help and schema work offline. `ephemeris version --json` identifies the installed CLI; it does not query the hosted service. Requires Node.js 22.23.4+, 24.22.1+ or 26.12.1+. Version diagnostics: call MCP `get_version` with `{}` without an API key or forecast charge. It reports this hosted server's version, nullable build commit and supported forecast artifact schemas. The connection handshake reports the same server version. It cannot inspect the customer's npm bridge or CLI version; use `ephemeris --version` or offline `ephemeris version --json` for the installed CLI. Unknown build commits stay null. Versions are independent and do not establish model quality or npm update availability. The complete versioned CLI operating guide and generated command help are at https://ephemeris.cascade.industries/cli.txt. This single document includes discovery, valid input examples, saved artifacts, costs, authentication, deterministic interpretation, PNG/SVG plots and safe recovery. Its release metadata is at https://ephemeris.cascade.industries/cli-docs-version.json. Human CLI walkthrough: https://ephemeris.cascade.industries/docs/cli — installation, browser sign-in, CSV inspection, offline validation, paid forecasting, saved PNG/SVG plots and submission recovery. The complete generated command reference remains at /cli.txt. Privacy policy: https://ephemeris.cascade.industries/docs/privacy — account and forecast data, where inference runs, providers, retention and privacy requests.