Skip to main content
POST
/
assets
/
unfavorite
Unfavorite asset
curl --request POST \
  --url https://api.fal.ai/v1/assets/unfavorite \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "vector_id": "b1a2b4a5-cb89-51dc-a108-6dbfd8e742fc"
}
'
import requests

url = "https://api.fal.ai/v1/assets/unfavorite"

payload = { "vector_id": "b1a2b4a5-cb89-51dc-a108-6dbfd8e742fc" }
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({vector_id: 'b1a2b4a5-cb89-51dc-a108-6dbfd8e742fc'})
};

fetch('https://api.fal.ai/v1/assets/unfavorite', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "is_favorited": false
}
{
"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

Authorization
string
header
required

API key must be prefixed with "Key ", e.g. Authorization: Key YOUR_API_KEY

Headers

Idempotency-Key
string

Optional idempotency key for safe request retries

Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

application/json
request_id
string

Request ID to save as an asset before mutating

Minimum string length: 1
vector_id
string

Vector ID to save as an asset before mutating

Minimum string length: 1

Response

Asset unfavorited

is_favorited
boolean
required

Whether the asset is now favorited