> For the complete documentation index, see [llms.txt](https://developer.doctranslate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.doctranslate.io/document-translation-api/upload-api/upload-multiple-files-and-calculate-usage-cost.md).

# Upload multiple files and calculate usage cost

#### HTTP request <a href="#http-request" id="http-request"></a>

POST `/v1/upload`

**Authorization(***Bearer token or API key)*

*OAuth2PasswordBearer*

```
Authorization: OAuth2PasswordBearer
```

Header API Key

```
X-API-Key: <your_api_key>
```

**Request Body schema: multipart/form-data**

| KEY            | TYPE   | VALUE                                                                                                                                     |
| -------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| task\_type     | String | Classifying tasks corresponding to each translation mode such as: `document`, `images`, `audio`, `video`, `summarization`, `create_video` |
| files          | String | List of input files                                                                                                                       |
| youtube\_link  | String | link youtube if using video translation mode for youtube                                                                                  |
| access\_domain | String | Not transmitted by default                                                                                                                |

**Response**

**200:** Success

Response schema: *application/json*

| KEY          | VALUE                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| status\_code | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| content      | { "data": \[ { "filename": "2.text\_image.pdf", "status": true, "credits": 4.92, "task\_id": "f911298671b240f5984060c62cbbb218", "size": "0.18 MB" }, { "filename": "5.text\_images.docx", "status": true, "credits": 2.89, "task\_id": "af60061f95c8439a9ee55971b37a7e06", "size": "0.3 MB" } ], "errors": \[], "error\_description": "", "start\_time": "2024-07-09 11:28:00.044402", "end\_time": "2024-07-09 11:28:08.825665", "status": "success" } |

**400:** Bad Request

| KEY          | VALUE                                                                                                                                                                                                   |   |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
| status\_code | 400                                                                                                                                                                                                     |   |
| content      | { "data": {}, "errors": \[ "Error" ], "error\_description": "Error while sending message. Please check server!", "start\_time": "yyyy-mm-dd hh-mm-ss utc+7", "end\_time": "yyyy-mm-dd hh-mm-ss utc+7" } |   |
|              |                                                                                                                                                                                                         |   |

**401: A**uthentication Error

| KEY          | VALUE                             |   |
| ------------ | --------------------------------- | - |
| status\_code | 401                               |   |
| content      | { "detail": "Not authenticated" } |   |
|              |                                   |   |

Response schema: *application/json*

| detail |   |
| ------ | - |
