डेव्हलपर
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 च्या किंमती
किंमती लोड होत आहेत…
स्टुडिओचे प्लॅन पाहास्टुडिओतील डेव्हलपर विभाग
तुमच्या खात्यातील डेव्हलपर विभाग उघडण्यासाठी साइन इन करा.
- आढावास्टुडिओतील डेव्हलपर विभागाचे सुरुवातीचे पान.
- मॉडेलसूची, तांत्रिक मार्गदर्शिका आणि प्रत्येक मॉडेलची किंमत.
- API कीCreate and revoke integration keys.
- वापरDaily requests, errors, and accepted predictions.
- API खर्चस्टुडिओत केलेल्या रनच्या अंदाजित खर्चाची खासगी नोंद.
- विनंत्याView request history and HTTP responses.
- लॉगReview job outcomes and callback deliveries.
- दस्तऐवजAuthentication and examples of the API.