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

Filter by output modality

search
Any of:
string

Full-text search on name, aliases, and description

limit
Limit

Maximum number of results to return.

integer
default: 20 >= 1 <= 100

Maximum number of results to return.

cursor
Any of:
string

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
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
pagination
required
PaginationOutput
object
next_cursor
Any of:
string
has_more_results
required
Has More Results

If there are more results to page through

boolean
total_count
Any of:
integer
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.

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