Docs
upload_media_from_url
Add an image or a finished video to the workspace's media library from a public http(s) URL. heyeveryone downloads it in the background (images up to 50 MB, videos up to 300 MB; JPEG, PNG, WebP, GIF, MP4, MOV, WebM), checks it (dimensions, duration, codecs) and picks cover frames for videos. The asset comes back with status 'uploading'; poll list_media with its `mediaAssetId` until it is 'ready' (usually under a minute) or 'failed' (with probeError in plain words). Then reference it in posts by its id (mediaAssetId). Optionally give a file name and alt text. Private or internal addresses are refused.
Add an image or a finished video to the workspace's media library from a public http(s) URL. heyeveryone downloads it in the background (images up to 50 MB, videos up to 300 MB; JPEG, PNG, WebP, GIF, MP4, MOV, WebM), checks it (dimensions, duration, codecs) and picks cover frames for videos. The asset comes back with status 'uploading'; poll list_media with its mediaAssetId until it is 'ready' (usually under a minute) or 'failed' (with probeError in plain words). Then reference it in posts by its id (mediaAssetId). Optionally give a file name and alt text. Private or internal addresses are refused.
Access and cost
- Kind: mutation
- Scope: workspace
- Actors: member, agent
- Credits: Free
- Requires confirmation: false
- Accepts idempotency key: false
Input schema
{
"properties": {
"workspaceId": {
"format": "uuid",
"type": "string"
},
"url": {
"maxLength": 2000,
"minLength": 1,
"type": "string"
},
"filename": {
"maxLength": 255,
"minLength": 1,
"type": "string"
},
"altText": {
"maxLength": 2000,
"type": "string"
},
"kind": {
"enum": [
"image",
"video"
],
"type": "string"
}
},
"required": [
"workspaceId",
"url"
],
"type": "object"
}Output schema
{
"additionalProperties": false,
"properties": {
"mediaAsset": {
"additionalProperties": false,
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"workspaceId": {
"format": "uuid",
"type": "string"
},
"kind": {
"enum": [
"image",
"video"
],
"type": "string"
},
"status": {
"enum": [
"uploading",
"processing",
"ready",
"failed"
],
"type": "string"
},
"storageProvider": {
"enum": [
"supabase",
"r2"
],
"type": "string"
},
"storageBucket": {
"type": "string"
},
"storageKey": {
"type": "string"
},
"publicUrl": {
"type": [
"string",
"null"
]
},
"filename": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"sizeBytes": {
"type": [
"string",
"null"
]
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"durationMs": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"probe": {
"type": "object"
},
"probeError": {
"type": [
"string",
"null"
]
},
"covers": {
"items": {
"additionalProperties": false,
"properties": {
"storageKey": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"atMs": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"storageKey",
"width",
"height",
"atMs"
],
"type": "object"
},
"type": "array"
},
"altText": {
"type": [
"string",
"null"
]
},
"createdByAccountId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
},
"createdByAgentClientId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
},
"previewUrl": {
"type": [
"string",
"null"
]
},
"coverFrames": {
"items": {
"additionalProperties": false,
"properties": {
"atMs": {
"minimum": 0,
"type": "integer"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"url": {
"type": "string"
}
},
"required": [
"atMs",
"width",
"height",
"url"
],
"type": "object"
},
"type": "array"
},
"fitsPlatforms": {
"items": {
"enum": [
"x",
"linkedin",
"threads",
"bluesky",
"instagram",
"facebook",
"tiktok",
"youtube",
"sandbox"
],
"type": "string"
},
"type": "array"
}
},
"required": [
"id",
"workspaceId",
"kind",
"status",
"storageProvider",
"storageBucket",
"storageKey",
"publicUrl",
"filename",
"mimeType",
"sizeBytes",
"width",
"height",
"durationMs",
"probe",
"probeError",
"covers",
"altText",
"createdByAccountId",
"createdByAgentClientId",
"createdAt",
"updatedAt",
"previewUrl",
"coverFrames",
"fitsPlatforms"
],
"type": "object"
}
},
"required": [
"mediaAsset"
],
"type": "object"
}Errors
[
"invalid_url"
]Annotations
{
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": true,
"readOnlyHint": false,
"title": "Upload media from a URL"
}