Media
Markdown ↗

Import media

POST/api/v3/media

Overview

Import one publicly reachable HTTP(S) media URL into your account and receive a reusable media_id. HTTPS is recommended. Accepts JSON with url, not multipart upload. Shared remote-media validation, supported formats and access rules apply. Imports have a 24-hour lifecycle; inspect url_expires_at when present. Pass the returned media_id in a supported input collection or pass a URL directly when creating a run. This operation does not generate media.

Requires an API key. Send Authorization: Bearer YOUR_API_KEY. Authentication →

curl 'https://fusara.ai/api/v3/media' \
  -H "Authorization: Bearer $FUSARA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "url": "https://your-app.example/product.png"
}'

Request body

urlstringrequired

Public HTTP(S) media URL without credentials or fragments. Both the supplied and encoded URL must fit within 2048 characters. It must satisfy the shared remote-media access and format policy.

  • Format: uri
  • Minimum length: 1
  • Maximum length: 2048

Responses

Created

Illustrative response. Prices, IDs and URLs come from your own request.

Example response
{
  "type": "image",
  "media_id": 901,
  "url": "https://media.example/product.png",
  "url_expires_at": "2026-10-25T12:00:00Z"
}
typestringrequired
  • Alternative values: "text", "json", "boolean", "image", "video", "audio", "media", "model_asset"
media_idinteger

Reusable account media ID when this output is a file.

  • Format: int64
  • Minimum: 0
  • Maximum: 4294967295
urlstring

Download URL when the file is available. Save it before url_expires_at.

UTC expiry of this output URL, when provided.

  • Format: date-time
expiredboolean

True when the media is no longer available; its dead URL is omitted.

valueany JSON value

Inline result: a string for type=text, a native JSON value for type=json, or a boolean for type=boolean. Empty strings, false and JSON null are valid values. Omitted for files and model assets.

  • When type is "text": required; string
  • When type is "json": required; any JSON value
  • When type is "boolean": required; boolean
  • When type is "image" or "video" or "audio" or "media" or "model_asset": must be omitted
  • Format: int64
  • Minimum: 0
  • Maximum: 4294967295

Response headers

X-Request-Idstringrequired

Support/trace identifier for this HTTP request.