{"command":{"effect":"write","timeoutSeconds":120,"inputSchema":{"type":"object","description":"Creates and executes a batch from an uploaded file of requests","properties":{"body":{"$ref":"#/definitions/CreateBatchRequest"}},"required":["body"],"additionalProperties":false,"definitions":{"CreateBatchRequest":{"type":"object","required":["input_file_id","endpoint","completion_window"],"properties":{"input_file_id":{"type":"string","description":"The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.\n"},"endpoint":{"type":"string","enum":["/v1/responses","/v1/chat/completions","/v1/embeddings","/v1/completions","/v1/moderations","/v1/images/generations","/v1/images/edits","/v1/videos"],"description":"The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`, `/v1/images/generations`, `/v1/images/edits`, and `/v1/videos` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch."},"completion_window":{"type":"string","enum":["24h"],"description":"The time frame within which the batch should be processed. Currently only `24h` is supported."},"metadata":{"$ref":"#/definitions/Metadata"},"output_expires_after":{"$ref":"#/definitions/BatchFileExpirationAfter"}}},"Metadata":{"anyOf":[{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n","additionalProperties":{"type":"string"}},{"type":"null"}]},"BatchFileExpirationAfter":{"type":"object","title":"File expiration policy","description":"The expiration policy for the output and/or error file that are generated for a batch.","properties":{"anchor":{"description":"Anchor timestamp after which the expiration policy applies. Supported anchors: `created_at`. Note that the anchor is the file creation time, not the time the batch is created.","type":"string","enum":["created_at"]},"seconds":{"description":"The number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).","type":"integer","minimum":3600,"maximum":2592000}},"required":["anchor","seconds"]}}},"name":"Create batch","id":"openai.createbatch","example":{"body":{"input_file_id":"example","endpoint":"/v1/responses","completion_window":"24h"}},"maxRequests":1,"summary":false}}