Upload asset
Upload asset for the authenticated user’s fal Assets library.
Required permissions: assets:write. Key presets that include them: API, SERVERLESS, FULL. See key permissions.
curl --request POST \
--url https://api.fal.ai/v1/assets/uploads \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://v3b.fal.media/files/b/0a9b4900/PDbTGyzqRh1aijW2WQiY9_opengraph-1%20%281%29.png",
"type": "image"
}
'import requests
url = "https://api.fal.ai/v1/assets/uploads"
payload = {
"url": "https://v3b.fal.media/files/b/0a9b4900/PDbTGyzqRh1aijW2WQiY9_opengraph-1%20%281%29.png",
"type": "image"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://v3b.fal.media/files/b/0a9b4900/PDbTGyzqRh1aijW2WQiY9_opengraph-1%20%281%29.png',
type: 'image'
})
};
fetch('https://api.fal.ai/v1/assets/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"asset": {
"asset_id": "d8b6elcregj72v34jr8g",
"vector_id": "b1a2b4a5-cb89-51dc-a108-6dbfd8e742fc",
"request_id": "019e6d0a-e5be-7b82-b329-35ae64296902",
"url": "https://v3b.fal.media/files/b/0a9b4900/PDbTGyzqRh1aijW2WQiY9_opengraph-1%20%281%29.png",
"type": "image",
"title": "Cinematic portrait",
"endpoint": "fal-ai/flux/dev",
"created_at": "2026-05-23T20:00:00.000Z",
"source": "upload",
"prompt": "cinematic portrait of a character",
"width": 1024,
"height": 1024,
"content_type": "image/png",
"is_favorited": false,
"collection_ids": [
"d8b6elcregj72v34jr8g"
],
"tags": [
{
"id": "d9k7q2m4n6p8r1s3t5uv",
"name": "moodboard",
"created_at": "2026-05-23T20:00:00.000Z"
}
],
"similarity": 0.92
}
}{
"error": {
"type": "validation_error",
"message": "Invalid request parameters"
}
}{
"error": {
"type": "authorization_error",
"message": "Authentication required"
}
}{
"error": {
"type": "authorization_error",
"message": "Access denied"
}
}{
"error": {
"type": "not_found",
"message": "Resource not found"
}
}{
"error": {
"type": "validation_error",
"message": "Invalid request parameters"
}
}{
"error": {
"type": "validation_error",
"message": "Invalid request parameters"
}
}{
"error": {
"type": "rate_limited",
"message": "Rate limit exceeded"
}
}{
"error": {
"type": "server_error",
"message": "An unexpected error occurred"
}
}{
"error": {
"type": "server_error",
"message": "Upstream asset service failed"
}
}Authorizations
Key on the API preset, or any key whose permissions include the ones this API lists. APIs with no required permission accept any key. Prefix it with "Key ", e.g. Authorization: Key YOUR_API_KEY
Headers
Optional idempotency key for safe request retries
"550e8400-e29b-41d4-a716-446655440000"
Body
fal-hosted media URL to ingest into the asset library
Media type for the uploaded asset
image, video, audio, 3d Optional caller-provided caption or description to index with the uploaded asset
1 - 2000Optional manual collection ID to add the uploaded asset to
Whether to favorite the uploaded asset immediately
Tag IDs to assign to the uploaded asset
Response
Upload ingested
Asset details
Hide child attributes
Hide child attributes
Asset ID (canonical catalog identity)
"d8b6elcregj72v34jr8g"
Vector ID. Prefer asset_id for addressing
"b1a2b4a5-cb89-51dc-a108-6dbfd8e742fc"
Request ID
"019e6d0a-e5be-7b82-b329-35ae64296902"
Media URL
"https://v3b.fal.media/files/b/0a9b4900/PDbTGyzqRh1aijW2WQiY9_opengraph-1%20%281%29.png"
Asset media type
image, video, audio, 3d Display title
"Portrait"
Model endpoint that produced the asset
"fal-ai/flux/dev"
Asset creation time
"2026-05-23T20:00:00.000Z"
Asset source
"upload"
Saved prompt or description
"cinematic portrait"
Width in pixels
1024
Height in pixels
1024
Media content type
"image/png"
Whether the asset is favorited
false
Collections containing this asset
["d8b6elcregj72v34jr8g"]
Semantic similarity score when applicable
0.92
Was this page helpful?
curl --request POST \
--url https://api.fal.ai/v1/assets/uploads \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://v3b.fal.media/files/b/0a9b4900/PDbTGyzqRh1aijW2WQiY9_opengraph-1%20%281%29.png",
"type": "image"
}
'import requests
url = "https://api.fal.ai/v1/assets/uploads"
payload = {
"url": "https://v3b.fal.media/files/b/0a9b4900/PDbTGyzqRh1aijW2WQiY9_opengraph-1%20%281%29.png",
"type": "image"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://v3b.fal.media/files/b/0a9b4900/PDbTGyzqRh1aijW2WQiY9_opengraph-1%20%281%29.png',
type: 'image'
})
};
fetch('https://api.fal.ai/v1/assets/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"asset": {
"asset_id": "d8b6elcregj72v34jr8g",
"vector_id": "b1a2b4a5-cb89-51dc-a108-6dbfd8e742fc",
"request_id": "019e6d0a-e5be-7b82-b329-35ae64296902",
"url": "https://v3b.fal.media/files/b/0a9b4900/PDbTGyzqRh1aijW2WQiY9_opengraph-1%20%281%29.png",
"type": "image",
"title": "Cinematic portrait",
"endpoint": "fal-ai/flux/dev",
"created_at": "2026-05-23T20:00:00.000Z",
"source": "upload",
"prompt": "cinematic portrait of a character",
"width": 1024,
"height": 1024,
"content_type": "image/png",
"is_favorited": false,
"collection_ids": [
"d8b6elcregj72v34jr8g"
],
"tags": [
{
"id": "d9k7q2m4n6p8r1s3t5uv",
"name": "moodboard",
"created_at": "2026-05-23T20:00:00.000Z"
}
],
"similarity": 0.92
}
}{
"error": {
"type": "validation_error",
"message": "Invalid request parameters"
}
}{
"error": {
"type": "authorization_error",
"message": "Authentication required"
}
}{
"error": {
"type": "authorization_error",
"message": "Access denied"
}
}{
"error": {
"type": "not_found",
"message": "Resource not found"
}
}{
"error": {
"type": "validation_error",
"message": "Invalid request parameters"
}
}{
"error": {
"type": "validation_error",
"message": "Invalid request parameters"
}
}{
"error": {
"type": "rate_limited",
"message": "Rate limit exceeded"
}
}{
"error": {
"type": "server_error",
"message": "An unexpected error occurred"
}
}{
"error": {
"type": "server_error",
"message": "Upstream asset service failed"
}
}