开发者
Explore Wrongthinking models and the API for integrating predictions and simulations into your application.
API v1
API 端点
- GET
/v1/models查询可用于集成的模型目录。
- POST
/v1/predictions提交预测请求,附上模型和输入对象。
- GET
/v1/predictions/:id查询状态并获取结果。
快速入门
Try a demand forecast with Chronos-2 using your credentials.
The API accepts one asynchronous job per request. The body includes the model ID and its input object. Send the key in Authorization from your server.
POST /v1/predictions发送输入。如果需要重试,请保留幂等键。202 Accepted任务处理期间,请保存 ID 和结果 URL。GET /v1/predictions/:id查看状态,等预测完成后读取结果。
状态示例 queued → running → completed / failed.
如果收到 401,请检查 API 密钥。如果收到 429,请稍候,再使用同一个幂等键重试。
POST /v1/predictions HTTP/1.1Host: wrongthinking.comAuthorization: Bearer <API_KEY>Content-Type: application/jsonIdempotency-Key: <REQUEST_KEY> { "model": "chronos2", "input": { "values": [12, 15, 17, 16, 19, 18, 20, 24, 22, 25, 26, 29], "horizon": 2 }}身份验证
Create a key in Studio → Developers → API keys. Store it on your server and send it in the Authorization header.
Authorization: Bearer <API_KEY>API 参考
Check each model guide for inputs, Studio limits, and output format.
- GET
/v1/models查询可用于集成的模型目录。
- POST
/v1/predictions提交预测请求,附上模型和输入对象。
- GET
/v1/predictions/:id查询状态并获取结果。
- POST
/v1/batches向同一模型提交多组输入。
- GET
/v1/batches/:id查询批次状态和各项结果。
回调
callback_url is an optional HTTPS URL on your server. The event reports the terminal status and includes a reference for retrieving the response.
- prediction.completed
- 预测已完成,可以获取结果。
- prediction.failed
- 预测失败。请查询状态以查看错误。
- batch.completed
- 批处理已结束。即使批次状态为部分成功,也要检查每一项。
When integrating, verify the signature before accepting the event, deduplicate by ID, and return 2xx after recording it. Compute HMAC-SHA256 using your signing secret as text and Wrongthinking-Timestamp + a dot + the raw body. Compare the hex digest with Wrongthinking-Signature after v1=. Retries follow the previous failure after 1, 5 and 15 minutes.
{ "id": "evt_demo_001", "type": "prediction.completed", "data": { "id": "pred_demo_001", "model": "chronos2", "status": "completed", "result_url": "/v1/predictions/pred_demo_001" }}批处理
把同一模型的输入集中放在 items 下。为每项输入分配唯一的 custom_id,即使完成顺序不同,也能对应到正确的结果。
POST /v1/batches验证每项输入。若总大小或项目数超过上限,请拆分成多个批次。GET /v1/batches/:id查看每一项的状态。同一个批次可以同时包含成功和失败的项目。custom_id保存有效结果,只将需要重试的项目放入新的批次。
Each batch accepts 1–8 items, 512 KiB of JSON and 3 MiB of images combined. Up to two predictions run concurrently per account.
POST /v1/batches HTTP/1.1Host: wrongthinking.comAuthorization: Bearer <API_KEY>Content-Type: application/jsonIdempotency-Key: <REQUEST_KEY> { "model": "chronos2", "items": [ { "custom_id": "case-01", "input": { "values": [12, 15, 17, 16, 19, 18, 20, 24, 22, 25, 26, 29], "horizon": 2 } }, { "custom_id": "case-02", "input": { "values": [12, 15, 17, 16, 19, 18, 20, 24, 22, 25, 26, 29], "horizon": 2 } } ]}模型
Find a model by analysis type. Each guide includes its ID, fields, and API examples.
视觉注意力
API 价格
正在加载价格…
查看工作台套餐工作台中的开发者专区
登录后即可打开账户中的开发者专区。