مرجع API
سرد الدُّفعات
سرد الدُّفعات التي أنشأها الحساب الحالي.
سرد الدُّفعات التي أنشأها الحساب الحالي.
نقطة النهاية
- عنوان URL الأساسي
https://runapi.ai- إصدار API
v1- المصادقة
Authorization: Bearer YOUR_API_KEY
02
نص JSONالطلب
أرسل القيم فقط في موقع الطلب المُدرج.
معاملات الاستعلام2 حقل
afterstring
اختياري
إرجاع الدُّفعات بعد مؤشر معرّف الدُّفعة هذا.
limitinteger
اختياري
الحد الأقصى للدُّفعات المُعادة.
القيمة الافتراضية:20
نطاق: 1 - 100
03
HTTP 200استجابة النجاح
GET /v1/batches
JSON
{
"data": [
{
"completion_window": "24h",
"created_at": 1785196800,
"endpoint": "/v1/moderations",
"id": "batch_abc123",
"input_file_id": "file_batch123",
"metadata": {
"customer_tag": "demo"
},
"object": "batch",
"request_counts": {
"completed": 1,
"failed": 0,
"total": 3
},
"status": "in_progress"
}
],
"first_id": "batch_abc123",
"has_more": false,
"last_id": "batch_abc123",
"object": "list"
}
04
HTTP 401استجابة الخطأ (401)
مخطط الاستجابة
JSON
{
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"message",
"type"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
مثال على الاستجابة
JSON
{
"error": {
"code": "authentication_error",
"message": "Missing API key",
"param": null,
"type": "authentication_error"
}
}
05
HTTP 400استجابة الخطأ (400)
مخطط الاستجابة
JSON
{
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"message",
"type"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
مثال على الاستجابة
JSON
{
"error": {
"code": "invalid_request_error",
"message": "Malformed request",
"param": null,
"type": "invalid_request_error"
}
}
06
HTTP 404استجابة الخطأ (404)
مخطط الاستجابة
JSON
{
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"message",
"type"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
مثال على الاستجابة
JSON
{
"error": {
"code": "not_found",
"message": "File not found",
"param": null,
"type": "invalid_request_error"
}
}
07
HTTP 409استجابة الخطأ (409)
مخطط الاستجابة
JSON
{
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"message",
"type"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
مثال على الاستجابة
JSON
{
"error": {
"code": "upload_state_conflict",
"message": "Upload state conflict",
"param": null,
"type": "invalid_request_error"
}
}
08
HTTP 402استجابة الخطأ (402)
مخطط الاستجابة
JSON
{
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"message",
"type"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
مثال على الاستجابة
JSON
{
"error": {
"code": "payment_required",
"message": "Insufficient balance",
"param": null,
"type": "insufficient_balance"
}
}
09
HTTP 422استجابة الخطأ (422)
مخطط الاستجابة
JSON
{
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"message",
"type"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
مثال على الاستجابة
JSON
{
"error": {
"code": "invalid_upload",
"message": "Upload request rejected",
"param": null,
"type": "invalid_request_error"
}
}
10
HTTP 502استجابة الخطأ (502)
مخطط الاستجابة
JSON
{
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"message",
"type"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
مثال على الاستجابة
JSON
{
"error": {
"code": "storage_write_failed",
"message": "File storage failed",
"param": null,
"type": "server_error"
}
}
11
مثال cURL
CURL
curl -X GET https://runapi.ai/v1/batches?limit=20 \
-H 'Authorization: Bearer YOUR_API_KEY'