Request signed upload URL (recommended)
Get a signed URL to upload a file directly to storage, bypassing the server. This is the recommended upload method for large files.
Flow:
- Call this endpoint with content_type and file_size_bytes
- POST to the returned upload_url with header
x-goog-resumable: startto get a session URI - PUT your file content to the session URI (supports chunked/resumable uploads)
- Use the returned file_id as input to generation endpoints
Allowed types: audio/mpeg, audio/wav, image/jpeg, image/png, image/webp, video/mp4. Max size: 64 MB. Upload URL expires in 15 minutes.
Documentation Index
Fetch the complete documentation index at: https://docs.layer.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Personal Access Token or OAuth2 JWT. Create a PAT at app.layer.ai → Settings → Personal Access Tokens.
Path Parameters
Body
Response
Successful Response
Unique identifier for the file. Use as input to generation endpoints after upload completes.
Signed upload URL. POST to this URL to initiate a resumable upload, then PUT file chunks to the session URI returned in the Location header. Expires in 15 minutes.
MIME type to use when uploading.