Retrieve batch
One batch. OhMyGPT follows the provider on its own, so reading a batch does not call the provider.
ApiKeyAuthAuthorization<token>batch_id*stringThe id of a batch.
Successful response
application/json- response
completed_at?integerUnix seconds.
completion_window*stringcreated_at*integerUnix seconds.
endpoint*stringerror_file_id?stringRead 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?integerUnix seconds. Set once the provider accepts the batch.
failed_at?integerUnix seconds.
id*stringinput_file_id*stringmetadata*object*"batch""batch"output_file_id?stringRead it with GET /v1/files/{file_id}/content.
request_counts*completed, failed, and cancelled stay 0 until the batch is settled.
status*stringfinalizing 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.
"validating""in_progress""finalizing""completed""failed""expired""cancelling""cancelled"curl -X GET 'https://api.ohmygpt.com/v1/batches/string'{ "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"}Still stuck? Live chat · [email protected] · Telegram group
List batch requests GET
Each request of the batch in file order, with its status, tokens, and charge once the batch is settled.
Estimate request cost POST
Estimates what a request would cost without sending it or charging the account. Send the body you would send to the model's endpoint. Video models are priced exactly as `POST /v1/videos` prices the job when it is created, from `seconds`, `size`, `media` and `audio`; text to speech is priced by the characters of `input`; chat models get an upper bound from the text of `messages` and `max_tokens`. Image models are estimated from the output tokens per image the provider publishes for the requested `quality` and `size` (listed in `limits.image` of `GET /v1/models`), times `n`, plus the estimated tokens of `prompt`; reference images of edits are not included. Image models, sizes or qualities without published numbers return `confidence: unavailable` with zero cost. The model string is resolved the same way a request is, at the prices your account pays; when several providers could serve it at different prices, the most expensive is returned, because the serving provider depends on availability at request time. Time-window pricing (peak/off-peak) is resolved at the current UTC time.