---
title: "Create File"
method: POST
path: "/v1/files"
tags: ["files"]
---

# Create File

`POST /v1/files`

Upload a file that can be used across - Assistants API, Batch API 
This is the equivalent of POST https://api.openai.com/v1/files

Supports Identical Params as: https://platform.openai.com/docs/api-reference/files/create

Example Curl
```
curl http://localhost:4000/v1/files         -H "Authorization: Bearer sk-1234"         -F purpose="batch"         -F file="@mydata.jsonl"
    -F expires_after[anchor]="created_at"         -F expires_after[seconds]=2592000
```

## Query parameters

- `provider` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/sea-lion/apis/litellm-api.md) · [All operations](https://skmtc.net/sea-lion/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sea-lion/litellm-api/revisions/79928a3d37d3/schema)
