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

Name
Type
Required
Description
filename
string
—
Name to store the file under. Defaults to the last path segment of the URL.
sourceUrl
string
•
Public http(s) URL the toolkit fetches server-side. Images and video only, up to 512 MB.

Response

Field
Type
Always
Description
id
string
•
Media asset id. Use it to attach the asset to a post.
key
string
•
Object key in the product bucket. Private — hand it to no one, it is not a URL.
mime
string
•
Stored media type, or null while still pending.
error
string
•
Why the asset is failed — a readable reason, or null when nothing went wrong.
source
string
•
How the bytes arrived: url (fetched by the toolkit) or upload (PUT by the app).
status
string
•
Storage status: pending (the bytes are not in the bucket yet) -> ready (stored, attachable to a post) or failed (ingestion gave up; see error).
viewUrl
string
•
One-hour signed GET URL for a ready asset, or null while pending or failed. Treat it as a bearer link.
filename
string
•
Original filename, kept for display only.
createdAt
string
•
ISO-8601 creation time.
sizeBytes
integer
•
Stored size in bytes, or null while pending.
sourceUrl
string
•
The URL the bytes were fetched from, if any.
updatedAt
string
•
ISO-8601 time of the last change.
viewUrlExpiresAt
string
•
ISO-8601 expiry of the signed view URL, or null when no view URL is available.

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.

↑↓navigate↵select