Create upload
Parameters
mime_type: String
The MIME type of the file.
This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.
The intended purpose of the uploaded file.
See the documentation on File purposes.
Create upload
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
upload = openai.uploads.create(bytes: 0, filename: "filename", mime_type: "mime_type", purpose: {})
puts(upload){
"id": "upload_abc123",
"object": "upload",
"bytes": 2147483648,
"created_at": 1719184911,
"filename": "training_examples.jsonl",
"purpose": "fine-tune",
"status": "pending",
"expires_at": 1719127296
}
Returns Examples
{
"id": "upload_abc123",
"object": "upload",
"bytes": 2147483648,
"created_at": 1719184911,
"filename": "training_examples.jsonl",
"purpose": "fine-tune",
"status": "pending",
"expires_at": 1719127296
}