---
title: استرداد دُفعة | RunAPI
description: استرداد حالة الدُّفعة الحالية وعدد الطلبات.
url: https://runapi.ai/ar/docs/api/protocol/batches/retrieve.md
canonical: https://runapi.ai/ar/docs/api/protocol/batches/retrieve
locale: ar
---

> نسخة HTML: https://runapi.ai/ar/docs/api/protocol/batches/retrieve
> فهرس الموقع للوكلاء: https://runapi.ai/llms.txt

# استرداد دُفعة

استرداد حالة الدُّفعة الحالية وعدد الطلبات.

## نقطة النهاية

GET /v1/batches/:batch_id

عنوان URL الأساسي: https://runapi.ai

إصدار API: v1

المصادقة: Authorization: Bearer YOUR_API_KEY

## الطلب

أرسل القيم فقط في موقع الطلب المُدرج.

### معاملات المسار

```json
{
  "batch_id": {
    "description": "معرّف الدُّفعة في RunAPI.",
    "required": true,
    "type": "string"
  }
}
```

## استجابة النجاح

HTTP 200 - GET /v1/batches/:batch_id

```json
{
  "completed_at": 1785198600,
  "completion_window": "24h",
  "created_at": 1785196800,
  "endpoint": "/v1/moderations",
  "id": "batch_abc123",
  "input_file_id": "file_batch123",
  "metadata": {
    "customer_tag": "demo"
  },
  "object": "batch",
  "output_file_id": "file_output123",
  "request_counts": {
    "completed": 3,
    "failed": 0,
    "total": 3
  },
  "status": "completed"
}
```

## استجابة الخطأ (401)

HTTP 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"
  }
}
```

## استجابة الخطأ (400)

HTTP 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"
  }
}
```

## استجابة الخطأ (404)

HTTP 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"
  }
}
```

## استجابة الخطأ (409)

HTTP 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"
  }
}
```

## استجابة الخطأ (402)

HTTP 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"
  }
}
```

## استجابة الخطأ (422)

HTTP 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"
  }
}
```

## استجابة الخطأ (502)

HTTP 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"
  }
}
```

## مثال cURL



### curl

```curl
curl -X GET https://runapi.ai/v1/batches/batch_abc123 \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

## المرجع ذو الصلة

- [الدُّفعات](https://runapi.ai/ar/docs/api/protocol/batches.md)
- [كائن الدُّفعة](https://runapi.ai/ar/docs/api/protocol/batches/object.md)

---

## المزيد من RunAPI

- [الرئيسية](https://runapi.ai/ar/.md)
- [كتالوج النماذج](https://runapi.ai/ar/models.md)
- [الأسعار](https://runapi.ai/ar/pricing.md)
- [مزودو الخدمة](https://runapi.ai/ar/models)
- [التوثيق](https://runapi.ai/ar/docs/guides)
- [حزم SDK](https://runapi.ai/ar/sdk.md)
- [CLI](https://runapi.ai/ar/cli.md)
- [خادم MCP](https://runapi.ai/ar/mcp.md)
- [Claude Code مقابل Cursor](https://runapi.ai/ar/claude-code-vs-cursor.md)
- [إعداد Cursor API](https://runapi.ai/ar/cursor-api-setup.md)
- [RunAPI مقابل OpenRouter](https://runapi.ai/ar/openrouter-alternative.md)
- [المؤسسات](https://runapi.ai/ar/contact.md)
- [اتصل بنا](https://runapi.ai/ar/contact.md)
- [الشروط](https://runapi.ai/ar/terms.md)
- [الخصوصية](https://runapi.ai/ar/privacy.md)
- [فهرس الموقع للوكلاء](https://runapi.ai/llms.txt)

التواصل: contact@runapi.ai

## البيانات المنظمة

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "ar",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/ar",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/ar/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "ar",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/ar",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/aricon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "ar",
    "@type": "TechArticle",
    "headline": "استرداد دُفعة",
    "description": "استرداد حالة الدُّفعة الحالية وعدد الطلبات.",
    "url": "https://runapi.ai/ar/docs/api/protocol/batches/retrieve",
    "mainEntityOfPage": "https://runapi.ai/ar/docs/api/protocol/batches/retrieve"
  }
]
```
