Skip to content

Get base model

Viewing v2— current version

GET
/v2/workspaces/{workspace_id}/base-models/{base_model_id}
curl --request GET \
--url https://api.app.layer.ai/api/v2/workspaces/:workspace_id/base-models/:base_model_id \
--header 'Authorization: Bearer <token>'

Changed in v2. This endpoint’s contract differs from v1. See the v2 migration guide for the request and response changes before you switch.

Get a base model’s capabilities, pricing, and typical generation time.

workspace_id
required
Workspace Id

Id of the workspace that owns the resource.

string format: uuid

Id of the workspace that owns the resource.

base_model_id
required
Base Model Id

The base model, named by the id the list endpoint returns, or by its slug, display name, or alias.

string

The base model, named by the id the list endpoint returns, or by its slug, display name, or alias.

Successful Response

Media typeapplication/json
BaseModelDetail
object
base_model_id
required
Base Model Id

Base model identifier, e.g. flux-dev — pass it as base_model_id.

string
name
required
Name

Display name.

string
aliases
Aliases

Community nicknames this model is also known by.

Array<string>
default:
modality
required
Modality

Image, video, three_d, or audio.

string
Allowed values: text image audio video three_d playable world
provider
Provider

Slug of the organization behind the model, e.g. openai or bfl, when known.

string
nullable
description
Description

Short description.

string
nullable
price_per_unit
Price Per Unit

CU cost per measurement unit.

number
nullable
price_unit
Price Unit

Measurement unit, e.g. megapixel, second, generation.

string
nullable
inference_timing
required
Inference Timing

Typical generation time range, e.g. ‘5-15s’.

string
capabilities
required
BaseModelCapabilitiesREST

Supported inputs, sizes, and generation features.

object
session_modes
Session Modes

Supported modes: create, create_video, create_3_d, create_speech, create_sound_effect, prompt_edit_image, etc.

Array<string>
text_prompt
Text Prompt
boolean
text_prompt_required
Text Prompt Required
boolean
max_prompt_chars
Max Prompt Chars

Longest prompt, in characters, the model accepts; null when unbounded.

integer
nullable
negative_prompt
Negative Prompt
boolean
seed
Seed
boolean
inpainting
Inpainting
boolean
outpainting
Outpainting
boolean
tileability
Tileability
boolean
native_tileability
Native Tileability

Generates a tileable image by construction when tileability is set, rather than through Layer’s seam-repair pass. Cannot be combined with a LoRA style.

boolean
tile_grid
Tile Grid

Draws a game tile (isometric or hex) onto a fixed grid when a generation sets tile_grid.

boolean
guidance_file_types
Guidance File Types

Supported guidance inputs and their per-type file limits. init_image is the source image an edit model modifies; reference_image supplies subjects to reproduce; ip_adapter is legacy IP-Adapter style-only transfer.

Array<object>
ToolGuidanceFileTypeSupport
object
type
required
Type

Guidance file type, such as init_image, reference_image, first_frame, pose, or depth.

string
max_count
required
Max Count

Maximum number of files of this type accepted by the model.

integer
max_duration_seconds
Max Duration Seconds

Longest single video or audio this slot accepts, in seconds. A cap on the combined length of several files is listed under shared_guidance_limits. Null when the model states no cap.

number
nullable
min_duration_seconds
Min Duration Seconds

Shortest video or audio this slot accepts, in seconds; a shorter one is rejected. Null when the model states no floor.

number
nullable
min_count
Min Count

Minimum number of files of this type a run must supply. 0 means the input is optional.

integer
0
shared_guidance_limits
Shared Guidance Limits

Caps on the combined count of several guidance types, on top of each type’s own max_count. A run must fit both: 9 images, 3 videos and 3 audio files can each be within their own limits and still exceed a 12-file total.

Array<object>
ToolSharedGuidanceLimit
object
types
required
Types

Guidance file types that count toward this limit.

Array<string>
max_count
required
Max Count

Most files of these types one run may attach combined. Only one first_frame counts.

integer
min_combined_duration_seconds
Min Combined Duration Seconds

Shortest summed length, in seconds, of the videos or audio of these types. Null when unbounded.

number
nullable
max_combined_duration_seconds
Max Combined Duration Seconds

Longest summed length, in seconds, of the videos or audio of these types. Null when unbounded.

number
nullable
init_image_views
Init Image Views

3D models that read their init_image files by view: the views a source can fill. Tag each init_image with the view it shows (view on the guidance file); the model reads each file as the view it is tagged with, so a wrong tag warps the mesh. Empty when the model takes its views unordered.

Array<string>
duration_seconds
Duration Seconds

Supported video durations in seconds

Array<integer>
duration_seconds_min
Duration Seconds Min

Audio models: shortest clip this model generates, in seconds.

number
nullable
duration_seconds_max
Duration Seconds Max

Audio models: longest clip this model generates, in seconds. Pass duration_seconds between the min and max; a request outside them is refused.

number
nullable
duration_seconds_required
Duration Seconds Required

This model has no default clip length; without duration_seconds the shortest is used.

boolean
quality_levels
Quality Levels

Quality rungs this model offers, lowest first, from minimal, low, medium, high, xhigh, max. Empty means the model has no quality control. Pass one of these as quality; a rung outside the list is clamped to the nearest one offered rather than refused. Higher rungs can cost more — price a run before spending on one.

Array<string>
generate_audio
Generate Audio
boolean
lipsync
Lipsync
boolean
textures
Textures
boolean
quad_mesh
Quad Mesh
boolean
pbr_materials
Pbr Materials
boolean
generate_parts
Generate Parts
boolean
text_to_speech
Text To Speech
boolean
sound_effect
Sound Effect
boolean
music
Music

Composes music. Distinguishes a music model from a sound-effect model, which the modality and the duration range alone do not.

boolean
lyrics
Lyrics

Takes sung words in a dedicated lyrics input, separate from the text prompt. This describes the input shape, not whether the model can sing: some families read lyrics written into the prompt instead, so a false value is not a reason to rule a model out for a song.

boolean
auto_duration
Auto Duration

The model sets the output length itself, from the text or the input file. It has no duration control, so duration_seconds is ignored: do not promise a requested length.

boolean
instrumental
Instrumental

Takes a flag that guarantees no vocals. On other music models, asking for an instrumental in the prompt is only a suggestion.

boolean
loop
Loop

Composes the clip to repeat with no audible seam when the loop parameter is set.

boolean
composition_plan
Composition Plan

Takes the track as an ordered list of sections, each with its own length, styles and sung lines, via the composition_plan parameter. A plan supersedes prompt, duration_seconds and instrumental, which are dropped rather than sent with it.

boolean
audio_inpaint
Audio Inpaint
boolean
audio_outpaint
Audio Outpaint
boolean
audio_segments
Audio Segments

Scores a video stretch by stretch from a contiguous list of per-stretch briefs.

boolean
output_formats
Output Formats

Containers this model can be asked to deliver. Layer never re-encodes a clip, so an empty list means the model returns what it returns and the format cannot be promised.

Array<string>
voice_reference_set_required
Voice Reference Set Required

Speaks only in a trained voice, so a generation needs a reference set holding one. Without it the provider falls back to its own default voice.

boolean
rigging
Rigging
boolean
animation
Animation
boolean
camera_transform
Camera Transform
boolean
draft
Draft

Renders a quick, low-cost draft when draft is set, to be completed at full quality later by its completion model (see the forge instructions).

boolean
camera_trajectory
Camera Trajectory
boolean
voice_changer
Voice Changer
boolean
audio_isolation
Audio Isolation
boolean
audio_denoise
Audio Denoise
boolean
audio_separation
Audio Separation
boolean
output_aspect_ratios
Output Aspect Ratios
Array<string>
output_size_envelope
Output Size Envelope
string
nullable
Example
{
"aliases": [],
"modality": "text",
"capabilities": {
"text_prompt": false,
"text_prompt_required": false,
"negative_prompt": false,
"seed": false,
"inpainting": false,
"outpainting": false,
"tileability": false,
"native_tileability": false,
"tile_grid": false,
"guidance_file_types": [
{
"min_count": 0
}
],
"duration_seconds_required": false,
"generate_audio": false,
"lipsync": false,
"textures": false,
"quad_mesh": false,
"pbr_materials": false,
"generate_parts": false,
"text_to_speech": false,
"sound_effect": false,
"music": false,
"lyrics": false,
"auto_duration": false,
"instrumental": false,
"loop": false,
"composition_plan": false,
"audio_inpaint": false,
"audio_outpaint": false,
"audio_segments": false,
"voice_reference_set_required": false,
"rigging": false,
"animation": false,
"camera_transform": false,
"draft": false,
"camera_trajectory": false,
"voice_changer": false,
"audio_isolation": false,
"audio_denoise": false,
"audio_separation": false
}
}

Unauthenticated — missing or invalid Bearer token.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Forbidden — insufficient permissions, or the access token lacks the scope the operation requires.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Resource not found.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

The outcome of the request with this Idempotency-Key is not known yet: it is still running, or it failed without a stored response. Retry after the number of seconds in Retry-After.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Invalid input parameters, or an Idempotency-Key reused for a different request.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Rate limited — retry after the number of seconds in Retry-After.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Internal server error.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}