Upload asset to LTX Studio
June 3, 2025
Table of contents
This endpoint uploads an asset (image, video, audio, or other file) to your LTX Studio account.
https://api.useapi.net/v1/ltxstudio/assets/?…
Request Headers
Authorization: Bearer {API token}
Content-Type: {file MIME type}
API token
is required, see Setup useapi.net for details.Content-Type
is required, specify the MIME type of the file being uploaded
Query Parameters
email
is optional when only one account configured.
However, if you have multiple accounts configured, this parameter becomes required.type
is optional, specify the asset upload type.
Supported values:image
is used by video generation endpoints POST videos/ltx-create and POST videos/veo-createreference-image
is used by image generation endpoints POST images/flux-edit and POST images/flux-create
Default isimage
.
Request Body
Binary file content (image, video, audio, or other media file).
Responses
-
{ "assetUrl": "https://storage.googleapis.com/lt-infinity-prd/artifacts/user-uploads/…", "expirationDateString": "1748919477350", "asset": { "type": "image", "fileId": "asset:3b18…-type:image/png", "mimeType": "image/png" } }
-
{ "error": "Error message", "code": 400 }
-
{ "error": "Unauthorized", "code": 401 }
Model
{ // TypeScript, all fields are optional
assetUrl?: string
expirationDateString?: string
asset?: {
type: string
fileId: string
mimeType: string
}
message?: string
error?: string
statusCode?: number
}
Examples
-
curl "https://api.useapi.net/v1/ltxstudio/assets/[email protected]&type=image" \ -H "Authorization: Bearer …" \ -H "Content-Type: image/png" \ --data-binary @image.png
-
const token = "API token"; const email = "[email protected]"; const file = document.getElementById('fileInput').files[0]; const apiUrl = `https://api.useapi.net/v1/ltxstudio/assets/?email=${email}&type=image`; const response = await fetch(apiUrl, { method: "POST", headers: { "Authorization": `Bearer ${token}`, "Content-Type": file.type, }, body: file }); const result = await response.json(); console.log("response", {response, result});
-
import requests token = "API token" email = "[email protected]" apiUrl = "https://api.useapi.net/v1/ltxstudio/assets/" headers = { "Authorization" : f"Bearer {token}", "Content-Type": "image/png" } params = { "email": email, "type": "image" } with open("image.png", "rb") as f: response = requests.post(apiUrl, headers=headers, params=params, data=f) print(response, response.json())