Skip to main content
POST
Upload an image

Authorizations

x-api-key
string
header
required

Your workspace API key, leap_.... Create one at https://app.tryleap.ai/go/api, and keep it on your server.

Query Parameters

filename
string

A name to keep with the file, such as portrait.jpg.

Required string length: 1 - 200

Body

The image itself.

The body is of type file.

Response

The stored file.

A photo, video or sound stored in your workspace, to pass as a model input.

id
string
required

The file's ID, file_.... Pass it in a model's input.

object
string
required
Allowed value: "file"
content_type
string
required

The type, read from the file's bytes, such as image/jpeg or video/mp4.

bytes
integer
required

The size in bytes.

Required range: 0 <= x <= 9007199254740991
width
integer | null
required

Width in pixels; null for a sound.

Required range: 0 < x <= 9007199254740991
height
integer | null
required

Height in pixels; null for a sound.

Required range: 0 < x <= 9007199254740991
duration
number | null
required

A video's or a sound's length in seconds; null for an image.

Required range: x >= 0
filename
string | null
required

The name you gave, if any.

url
string<uri>
required

A signed link to the file, valid for 24 hours. Read the file again for a fresh one.

created_at
string<date-time>
required

When it was stored.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Last modified on October 4, 2026