Upload file
upload_fileUse to upload JSONL files for batch API processing or image files for edit requests, returning a file_id for subsequent operations.
Instructions
Upload file Uploads a JSONL batch input file or an image input file that can be referenced by file_id in supported image edit requests.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Pass local file path. | |
| model | No | Optional TokenLab extension for image file uploads. Defaults to gpt-image-2 and binds the returned file_id to the selected image-edit configuration. | |
| purpose | Yes | Use batch for Batch API JSONL files. Use user_data or vision for image files that will be referenced from image edits. |