Skip to content

content_media_upload

Ingest media from a public http(s) URL: the toolkit fetches it and stores it in the product bucket.

Tool

content_media_upload

Ingest media from a public http(s) URL: the toolkit fetches it and stores it in the product bucket.

Ingest media from a public http(s) URL: the toolkit fetches it and stores it in the product bucket. Images and video up to 512 MB. A fetch that fails returns the asset with status "failed" and a reason rather than an error.

Behavior

HTTP
POST /content/media

Arguments

NameTypeRequiredDescription
filenamestringName to store the file under. Defaults to the last path segment of the URL.
sourceUrlstringPublic http(s) URL the toolkit fetches server-side. Images and video only, up to 512 MB.

Response

FieldTypeAlwaysDescription
idstringMedia asset id. Use it to attach the asset to a post.
keystringObject key in the product bucket. Private — hand it to no one, it is not a URL.
mimestringStored media type, or null while still pending.
errorstringWhy the asset is failed — a readable reason, or null when nothing went wrong.
sourcestringHow the bytes arrived: url (fetched by the toolkit) or upload (PUT by the app).
statusstringStorage status: pending (the bytes are not in the bucket yet) -> ready (stored, attachable to a post) or failed (ingestion gave up; see error).
filenamestringOriginal filename, kept for display only.
createdAtstringISO-8601 creation time.
sizeBytesintegerStored size in bytes, or null while pending.
sourceUrlstringThe URL the bytes were fetched from, if any.
updatedAtstringISO-8601 time of the last change.

Try it

Ingest media from a public http(s) URL: the toolkit fetches it and stores it in the product bucket.

When to use

Ingest media from a public http(s) URL: the toolkit fetches it and stores it in the product bucket. Images and video up to 512 MB. A fetch that fails returns the asset with status "failed" and a reason rather than an error.

Example

Ask your agent something like this:

Ingest media from a public http(s) URL: the toolkit fetches it and stores it in the product bucket.

The agent will invoke content_media_upload with these arguments:

{
  "sourceUrl": "<sourceUrl>"
}

Esc

Start typing to search the docs.

navigateselect