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

# Upload a source image (png/jpeg/webp, ≤10MB) to use as proxy src

` POST /api/v1/upload `

Upload a source image (png/jpeg/webp, ≤10MB) to use as proxy src

## Servers

- ` https://motioness.com ` — Production

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` sessionCookie `: ` apiKey `

  - Credential: ` better-auth.session_token ` in ` cookie `

  - Session cookie set by /api/user/signin, /api/user/signup, or the OAuth callback. Required for all authenticated endpoints.

## Request body (optional)

Content type: ` multipart/form-data `

- ` value `: type ` object `

  - ` file `: type ` string `; format ` binary ` — Image file (png/jpeg/webp)

## Responses

### ` 200 ` — Upload succeeded

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` url `, ` key `

  - ` url `: type ` string `

  - ` key `: type ` string `

### ` 400 ` — Missing file

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

### ` 413 ` — Too large

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

### ` 415 ` — Unsupported type

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

## Request examples

### cURL

```curl
curl -X POST 'https://motioness.com/api/v1/upload' \
  -H 'Content-Type: application/json' \
  -d '{
  "file": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://motioness.com/api/v1/upload', {
  method: 'POST',
  headers: {
      "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "file": "string"
  })
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

response = requests.post('https://motioness.com/api/v1/upload', json={
  "file": "string"
})
print(response.json())
```