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

Id of the base model, as returned by the list base models endpoint.

string

Id of the base model, as returned by the list base models endpoint.

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
description
Any of:
string
price_per_unit
Any of:
number
price_unit
Any of:
string
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
negative_prompt
Negative Prompt
boolean
seed
Seed
boolean
inpainting
Inpainting
boolean
outpainting
Outpainting
boolean
tileability
Tileability
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
duration_seconds
Duration Seconds

Supported video durations in seconds

Array<integer>
duration_seconds_min
Any of:
number
duration_seconds_max
Any of:
number
duration_seconds_required
Duration Seconds Required

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

boolean
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
camera_transform
Camera Transform
boolean
output_aspect_ratios
Output Aspect Ratios
Array<string>
output_size_envelope
Any of:
string
Example
{
"aliases": [],
"modality": "text",
"capabilities": {
"text_prompt": false,
"text_prompt_required": false,
"negative_prompt": false,
"seed": false,
"inpainting": false,
"outpainting": false,
"tileability": false,
"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,
"camera_transform": 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.

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."
}

Invalid input parameters.

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 — too many concurrent requests.

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."
}