Skip to content

List base models

Viewing v2— current version

GET
/v2/workspaces/{workspace_id}/base-models
curl --request GET \
--url https://api.app.layer.ai/api/v2/workspaces/:workspace_id/base-models \
--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.

List the base models enabled for this workspace, sourced from the model registry. Results come back in Layer’s recommended order, which reflects synced quality and popularity signals and can therefore shift between requests. Reference sets are listed separately under /reference-sets.

workspace_id
required
Workspace Id

Id of the workspace that owns the resource.

string format: uuid

Id of the workspace that owns the resource.

modality
Any of:
Modality
string
Allowed values: text image audio video three_d playable world

Filter by output modality

search
Search

Full-text search on name, aliases, and description

string
nullable

Full-text search on name, aliases, and description

use_case
Any of:
InferenceUseCase
string
Allowed values: text_to_image image_editing multi_angle inpainting reframing split_into_layers text_to_video image_to_video video_editing video_extend insert_video video_subtitle video_lipsync motion_transfer video_object_swap video_character_swap relight_video image_to_video_lipsync text_to_3d image_to_3d text_to_world image_to_world remesh retexture uv_unwrap animate rig segment image_segment text_to_speech sound_effects music upscaling video_interpolation denoise_image denoise_video denoise_audio voice_change audio_separation audio_isolation deblur_video restore_image sdr_to_hdr_video background_removal vectorization virtual_try_on restyle pixelate colorize change_expression erase_object edit_text dub_video extend_audio generate_pbr_materials create_skybox complete_draft

Filter to the models that declare this use case, in Layer’s recommended order for it. The finer-grained choice when the caller’s intent is known, e.g. retexture or rig.

tileable
Tileable

Set true to list only models that can generate seamless tileable textures.

boolean

Set true to list only models that can generate seamless tileable textures.

limit
Limit

Maximum number of results to return.

integer
default: 20 >= 1 <= 100

Maximum number of results to return.

cursor
Cursor

Cursor from a previous response to fetch the next page.

string
nullable

Cursor from a previous response to fetch the next page.

Successful Response

Media typeapplication/json
ListBaseModelsOutput
object
base_models
required
Base Models
Array<object>
BaseModelSummary
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
pagination
required
PaginationOutput
object
next_cursor
Next Cursor

Cursor to use to get the next page

string
nullable
has_more_results
required
Has More Results

If there are more results to page through

boolean
total_count
Total Count

Total number of results matching the query

integer
nullable
Example
{
"base_models": [
{
"aliases": [],
"modality": "text"
}
]
}

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