---
title: "import_file"
description: "Copy a file from a public https URL (up to 5 GB, with a Content-Length) into mixetape storage — e.g. a video from a render service whose link expires. mixetape fetches it and reads what it is; nothing is sent from your machine. Answers the file, ready to use. Needs the **storage** permission. Also available as the MCP tool `import_file`."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.mixetape.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: mixetape API › storage

`POST /api/v1/tools/import_file`

Copy a file from a public https URL (up to 5 GB, with a Content-Length) into mixetape storage — e.g. a video from a render service whose link expires. mixetape fetches it and reads what it is; nothing is sent from your machine. Answers the file, ready to use. Needs the **storage** permission. Also available as the MCP tool `import_file`.

## Authentication

- `apiKey`, http, header `Authorization`

## Request body

_Required._

- `import_file.url` (string, required)
- `import_file.fileName` (string, optional) — Defaults to the URL's file name

## Example request

```json
{
  "url": "string",
  "fileName": "string"
}
```

## Code samples

### cURL

```curl
curl --request POST \
  --url https://mixetape.com/api/v1/tools/import_file \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "string",
  "fileName": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://mixetape.com/api/v1/tools/import_file';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({url: 'string', fileName: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://mixetape.com/api/v1/tools/import_file"

payload = {
    "url": "string",
    "fileName": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The tool's result.

#### Example

```json
{
  "result": null
}
```

- `import_file.response.200.result` (unknown, required) — What the tool returns

### 400

The request is invalid; `error` says why.

#### Example

```json
{
  "error": "string"
}
```

- `import_file.response.400.error` (string, required) — What went wrong, in plain words

### 401

No valid API key.

#### Example

```json
{
  "error": "string"
}
```

- `import_file.response.401.error` (string, required) — What went wrong, in plain words

### 403

The key lacks the permission this needs.

#### Example

```json
{
  "error": "string"
}
```

- `import_file.response.403.error` (string, required) — What went wrong, in plain words

### 404

Not found, or not yours.

#### Example

```json
{
  "error": "string"
}
```

- `import_file.response.404.error` (string, required) — What went wrong, in plain words


Source: https://docs.mixetape.com/api/storage/import_file/index.md
