Skip to main content
POST
/
files
Error
A valid request URL is required to generate request examples
{
  "id": "<string>",
  "bytes": 123,
  "created_at": 123,
  "filename": "<string>",
  "object": "file",
  "purpose": "assistants",
  "status": "uploaded",
  "expires_at": 123,
  "status_details": "<string>"
}

Authorizations

api-key
string
header
required

Query Parameters

api-version
enum<string>
default:v1

The explicit Azure AI Foundry Models API version to use for this request. v1 if not otherwise specified.

Available options:
v1,
preview

Body

multipart/form-data
file
file
required
expires_after
object
required
purpose
enum<string>
required

The intended purpose of the uploaded file. One of: - assistants: Used in the Assistants API - batch: Used in the Batch API - fine-tune: Used for fine-tuning - evals: Used for eval data sets

Available options:
assistants,
batch,
fine-tune,
evals

Response

The request has succeeded.

id
string
required

The file identifier, which can be referenced in the API endpoints.

bytes
integer<int64> | null
required

The size of the file, in bytes.

created_at
integer<unixtime>
required

The Unix timestamp (in seconds) for when the file was created.

filename
string
required

The name of the file.

object
enum<string>
required

The object type, which is always file.

Available options:
file
purpose
enum<string>
required

The intended purpose of the file. Supported values are assistants, assistants_output, batch, batch_output, fine-tune and fine-tune-results.

Available options:
assistants,
assistants_output,
batch,
batch_output,
fine-tune,
fine-tune-results,
evals
status
enum<string>
required
Available options:
uploaded,
pending,
running,
processed,
error,
deleting,
deleted
expires_at
integer<unixtime>

The Unix timestamp (in seconds) for when the file will expire.

status_details
string
deprecated

Deprecated. For details on why a fine-tuning training file failed validation, see the error field on fine_tuning.job.