المطوّرين
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احتفظ بالمعرّف ورابط النتيجة طول ما المهمة شغّالة.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
الأسعار بتتحمّل…
شوف باقات Studioقسم المطوّرين في Studio
سجّل دخول عشان تفتح قسم المطوّرين في حسابك.
- نظرة عامةبداية قسم المطوّرين في Studio.
- النماذجالكتالوج والأدلة التقنية والأسعار لكل نموذج.
- مفاتيح الـAPICreate and revoke integration keys.
- الاستخدامDaily requests, errors, and accepted predictions.
- تكاليف الـAPIسجل خاص بالتكاليف التقديرية للتشغيل في Studio.
- الطلباتView request history and HTTP responses.
- السجلاتReview job outcomes and callback deliveries.
- التوثيقAuthentication and examples of the API.