OhMyGPT
Batches

Retrieve batch

GET
/v1/batches/{batch_id}

One batch. OhMyGPT follows the provider on its own, so reading a batch does not call the provider.

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

batch_id*string

The id of a batch.

Response Body

Successful response

application/json
  1. response
completed_at?integer

Unix seconds.

completion_window*string
created_at*integer

Unix seconds.

endpoint*string
error_file_id?string

Read it with GET /v1/files/{file_id}/content.

errors?

Present when the batch could not start. Nothing is charged for such a batch.

expires_at?integer

Unix seconds. Set once the provider accepts the batch.

failed_at?integer

Unix seconds.

id*string
input_file_id*string
metadata*
object*"batch"
Value in"batch"
output_file_id?string

Read it with GET /v1/files/{file_id}/content.

request_counts*

completed, failed, and cancelled stay 0 until the batch is settled.

status*string

finalizing covers the provider's own finalizing step and the time OhMyGPT takes to settle the batch after the provider finishes. Results and final counts appear after it.

Value in"validating""in_progress""finalizing""completed""failed""expired""cancelling""cancelled"
Example Request
curl -X GET 'https://api.ohmygpt.com/v1/batches/string'
Example Response
{  "completed_at": 0,  "completion_window": "string",  "created_at": 0,  "endpoint": "string",  "error_file_id": "string",  "errors": {    "data": [      {        "code": "string",        "message": "string"      }    ],    "object": "list"  },  "expires_at": 0,  "failed_at": 0,  "id": "string",  "input_file_id": "string",  "metadata": {    "property1": "string",    "property2": "string"  },  "object": "batch",  "output_file_id": "string",  "request_counts": {    "cancelled": 0,    "completed": 0,    "failed": 0,    "total": 0  },  "status": "validating"}

Was this page helpful?

Still stuck? Live chat · [email protected] · Telegram group