POST
/v1/media/uploadCreate a media upload URL
Returns a presigned PUT URL. Upload the bytes directly to it, then reference publicUrl in a post.
Required permission: `media:write`
Accepts `profileId` to target a specific profile. Omit it to use the key’s home profile.
- Base URL
- https://api.cutedyno.com
- Permission
media:write- Idempotency
- Not applicable. This request has no side effects worth deduplicating.
- MCP tool
- upload_media
Request
curl -X POST "https://api.cutedyno.com/v1/media/upload" \
-H "Authorization: Bearer $CUTEDYNO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"profileId": "profile_a1b2c3d4",
"fileName": "Acme Corp",
"fileType": "image/jpeg"
}'Body
fileNamestringrequiredOriginal file name, used to pick an extension.
fileTypeenumrequiredMIME type of the file you are about to upload.
One of:image/jpegimage/jpgimage/pngimage/webpimage/gifvideo/mp4video/quicktimevideo/webmvideo/x-msvideo
profileIdstringoptionalProfile to act on. Defaults to the profile the API key was created in.
Response
Returns 200 with the following body.
signedUrlstringrequiredPUT the file bytes here.
publicUrlstringrequiredUse this URL in the post's media array.
keystringrequiredexpiresInnumberrequiredSeconds until signedUrl expires.
maxBytesnumberrequiredLargest file the upload will accept.
Example
{
"signedUrl": "https://cdn.example.com/media/launch.jpg",
"publicUrl": "https://cdn.example.com/media/launch.jpg",
"key": "string",
"expiresIn": 0,
"maxBytes": 0
}Errors
Failures use the standard error envelope. Branch on code, never on the message.
| Status | Code | When it happens |
|---|---|---|
| 400 | invalid_request | The request body or query string failed validation. The message names the offending field. |
| 401 | invalid_api_key | The key does not exist, was revoked, or is malformed. Keys start with cdyn_live_. |
| 415 | unsupported_media_type | The fileType passed to POST /v1/media/upload is not an accepted image or video type. |
| 429 | rate_limit_exceeded | Too many requests for this key. Honour the Retry-After header before retrying. |
| 500 | internal_error | Something failed on our side. Retry with the same Idempotency-Key; report the requestId if it persists. |