Your numbers in.
The next numbers out.
Send a sequence. Get a best-guess forecast of the same length. Include time or keys and Pretick continues them too.
For probabilities of named outcomes, use the experimental Jev outcome API.
1. Get a key
Request a free key at the playground, or call POST /v1/trial with {"email":"you@example.com"}. Retrieve your key from email. It includes 5 free forecasts. Add credit at pricing using the same email. Keep the key on your server.
2. Send your numbers
Preferred timestamp/value format, frequency inference, daily sessions and free parsing preview. Timestamps are accepted separately from numeric values in structured requests. Pretick constructs the future time grid; the models predict values for those slots.
curl https://pretick.ai/v1/timeseries/forecast \
-H "Authorization: Bearer $PRETICK_API_KEY" \
-H "Content-Type: application/json" \
--data '{"data":"102, 108, 111, 104, 99, 106"}'That returns six predictions. The only required field is data: pasted text or a JSON array of numbers. Use 3–1,024 observations, oldest first. Commas, tabs, spaces, newlines, semicolons and pipes are accepted. Use a period for decimals; commas separate values, not thousands.
predictions is the primary result: one array of best-guess numbers (the median across participating model predictions by default). The playground shows the chart first, then a copyable forecast using your input’s separators. Set an optional horizon from 1 to 1,024 to override the default length.
Use the exact request format
Send a JSON object to POST https://pretick.ai/v1/timeseries/forecast, with Bearer authorization and Content-Type: application/json. For simple requests, data is a string or a flat array of numbers. For advanced requests, history.values is an array of numeric rows. Date/value objects, chat messages, and provider-specific request envelopes are not accepted.
Omit model for consensus, or choose amazon/chronos-2, google/timesfm-2.5, or nxai/tirex-2. The legacy pretick-default alias keeps using Chronos-2. GET /v1/models lists capabilities without authentication. Available request shapes and runnable examples are in the shared examples and OpenAPI.
{
"data": [
102,
108,
111,
104,
99,
106
],
"horizon": 3
}Use JSON.stringify or your HTTP library's JSON option so quotes and newlines are encoded correctly. The documentation and OpenAPI examples are checked against the API validator in CI.
Time or key + value
Paste two columns, two rows with equal numbers of entries, or alternating date/value lines. The first contains times or keys; the second contains values. Optional headers include time, date, timestamp, period, key or index. The output advances the keys by the detected interval.
{
"data": "key,value\n1,102\n2,108\n3,111"
}This returns three predictions with "times": ["4", "5", "6"]. The playground copies three key/value rows, retaining the header and separators.
{
"data": "12/1,102\n12/2,108\n12/3,111"
}This returns dates 12/4, 12/5, 12/6, paired with three predicted values. Slash dates use month/day, with an optional four-digit year; dates without a year start in the current year. ISO dates (YYYY-MM-DD) and ISO timestamps are also accepted. Monthly dates retain their calendar cadence, including month ends. Timestamps retain their supplied timezone offset.
Weekday-only daily observations may skip weekends and occasional dates. Pretick detects that pattern, keeps the observed values without filling gaps, and predicts one next observation per weekday. The playground shows this assumption; the API includes time_schedule. Weekends are skipped, but future holidays are not excluded because the input does not identify a market or holiday calendar. Other irregular dates, missing cells and mismatched rows return an input error before any charge. Time labels determine output labels; they are not additional model features. A plain value sequence has no invented time keys.
Choose a model or consensus
Consensus costs $0.02 total, including component opinions. It takes the median of the available model predictions at each step (the average when two participate). At least two models must succeed; otherwise the request fails and is refunded. components identifies each model, version, forecasts, status and exclusion reason; consensus identifies the included models and whether the result is partial.
TiRex-2 supports up to 320 future points and is excluded from longer consensus requests. TimesFM forecasts targets separately and is excluded when the request includes past covariates. Consensus with past covariates therefore requires a horizon of 320 or fewer; use Chronos-2 for longer covariate forecasts. Unsupported single-model requests are rejected before billing. Read the model cards for training data and supported behavior.
Response
Read predictions first, and pair with times when provided. prediction_columns names the predicted columns. For one target, predictions is a flat array; for multiple targets, it is a row matrix in that column order.
Consensus returns empty top-level quantiles and a model_range containing the minimum and maximum component point predictions; this spread is not a probability interval. For individual model estimates, forecasts retains each target’s full-precision median and requested quantiles. Every forecast has exactly horizon entries. Other fields include model_version, request_id, usage dimensions, cost_cents and remaining balance_cents. Quantile ranges are estimates, not guaranteed coverage.
Advanced: multiple columns and custom quantiles
{
"model": "pretick-default",
"history": {
"columns": [
"sales",
"temperature"
],
"values": [
[
102,
18
],
[
108,
19
],
[
111,
20
],
[
104,
18
],
[
99,
17
],
[
106,
19
]
]
},
"frequency": "1d",
"targets": [
"sales"
],
"horizon": 3,
"quantiles": [
0.1,
0.5,
0.9
]
}| Field | Meaning and limits |
|---|---|
history.columns | 1–8 unique names, up to 64 characters each. |
history.values | 3–2,048 equally spaced rows, oldest first. One finite number per column, magnitude ≤ 1e12. No nulls. |
frequency | Interval metadata: positive integer followed by s, min, h, d or w. Simple input defaults to 1d; this field does not generate its time labels or add calendar features. |
targets | Unique column names to forecast jointly. Other columns are past-only covariates. |
horizon | Required in advanced JSON: 1–1,024 future steps. |
quantiles | 1–9 ascending unique levels from 0.1 to 0.9. Default [0.1, 0.5, 0.9]. |
model | Optional: consensus (default), amazon/chronos-2, google/timesfm-2.5, nxai/tirex-2. Legacy pretick-default means Chronos-2. |
Align and resample observations first. Timestamped requests derive known clock and weekday features internally. Arbitrary user-supplied future covariates, categorical features and training endpoints are not exposed. Requests use pretrained weights; they do not permanently train the model.
Usage and credit
curl https://pretick.ai/v1/usage \ -H "Authorization: Bearer $PRETICK_API_KEY"
Usage returns your balance and latest 100 request accounting records. Successful forecasts cost $0.02; trial credit covers five. Failed inference is refunded. A human completes paid Stripe checkout; the same key keeps working after a top-up.
| Status | Action |
|---|---|
| 400 | Fix input format, dates, dimensions or numeric limits. |
| 401 | Check your key and Bearer authorization. |
| 402 | Top up the same email account. |
| 413 | Reduce the request to at most 400,000 bytes. |
| 429 | Trial signup limit reached; retry later or contact support. |
| 503 | Service busy or unavailable. Check refund status before retrying. |
Allow up to 180 seconds for the client, including long Kronos forecasts. Start with one request at a time. Client retries are separate billable requests: inspect usage after a network timeout. If you receive refund_pending or accounting_pending, retain the request ID and contact support before retrying.
Diagnosing service errors
Invalid request formats return 400 invalid_request before billing. Upstream failures return 503 forecast_unavailable (or refund_pending if the refund needs checking), with a request ID. The response includes failure_reason and, when an HTTP response was received upstream, upstream_status. An upstream 502 can therefore appear inside a 503 response. A 502 from an application proxy should be investigated with its original upstream response and URL. Do not expose keys or raw infrastructure error pages.
For AI agents
Connect ChatGPT or another MCP client at https://pretick.ai/mcp using OAuth. The tools use the same formats, credit and inference path described here.
Install the forecasting skill or copy instructions for your agent. Use llms.txt, the full guide and OpenAPI. The flow is trial → emailed key → forecast → usage → human-approved checkout → same key.