> For the complete documentation index, see [llms.txt](https://help.blotato.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.blotato.com/api-and-mcp-concepts/media-uploads-and-conversion.md).

# Media uploads and conversion

Choose the input flow before publishing. Uploading a file and converting it to meet a platform's requirements are separate operations.

| Your input                                              | Next action                                                           |
| ------------------------------------------------------- | --------------------------------------------------------------------- |
| Public image or video URL                               | Pass it directly in `mediaUrls`. No upload step required.             |
| Finished Blotato visual                                 | Pass the returned `mediaUrl` or `imageUrls`. No upload step required. |
| File on the user's computer or in the agent's workspace | Complete a presigned upload, then pass `publicUrl`.                   |
| Private download link or editor/share page              | Obtain a public downloadable media URL, or upload the file bytes.     |

## Upload a local file

1. Call `blotato_create_presigned_upload_url` with `filename`, including its extension. For REST, call `POST /v2/media/uploads` with the same field.
2. Send an HTTP `PUT` to the returned `presignedUrl`, with the raw file bytes as the request body.
3. After the upload succeeds, pass the returned `publicUrl` in the publish request's `mediaUrls` array.

The PUT body is raw bytes. Do not send JSON or multipart form data. The assistant needs access to the file and an HTTP tool or shell to perform the PUT. Creating the URL alone does not upload the file.

If the assistant's environment blocks the upload destination, follow the [MCP network-egress troubleshooting](/start-with-an-ai-agent/mcp/faqs.md#which-blotato-domains-do-i-need-to-allowlist). For REST upload shapes, see [Upload Media](/rest-api-reference/publish-post/upload-media-v2-media.md).

## Check conversion requirements

Blotato validates media for the destination platform and performs supported conversions when required. Automatic video conversion is limited to videos no longer than 120 seconds. A longer video must already meet the applicable publishing requirements.

1. Check the [platform media requirements](/rest-api-reference/publish-post/media.md).
2. Check the file's container, codecs, dimensions, aspect ratio, duration, bitrate, and size.
3. If a video longer than 120 seconds needs cropping, resizing, or re-encoding, edit and export it before publishing.
4. Use a URL which serves the media without a login.
5. Submit the post and check its final publishing status.

An `.mp4` filename does not prove the container, codecs, or aspect ratio. Upload success does not establish platform compatibility.

For Instagram Reels, see the [Reel troubleshooting checklist](/social-accounts-and-platform-faqs/instagram/faqs.md#my-instagram-reel-is-under-300-mb-and-15-minutes-why-was-it-rejected). Account upload limits and platform file limits both apply. See [Billing and credits](/settings/billing-and-credits.md) and [Media requirements](/rest-api-reference/publish-post/media.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.blotato.com/api-and-mcp-concepts/media-uploads-and-conversion.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
