Skip to content

List reference sets

Viewing v2— current version

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

New in v2. This endpoint has no v1 equivalent.

List the workspace’s reference sets. Pass a returned reference_set_id in the reference_sets array of an inference request. Only sets that are ready to generate with are listed: archived sets, and empty ones with no files, no trained model and no prompt fragments, are omitted.

workspace_id
required
Workspace Id

Id of the workspace that owns the resource.

string format: uuid

Id of the workspace that owns the resource.

search
Any of:
string
<= 200 characters

Full-text search on name/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
ListReferenceSetsOutput
object
reference_sets
required
Reference Sets
Array<object>
ReferenceSetSummary
object
reference_set_id
required
Reference Set Id

Reference set identifier — pass it in reference_sets.

string format: uuid
name
required
Name

Display name of the reference set.

string
category
Any of:
StyleCategory
string
Allowed values: general character object scene effect animation
has_active_finetune
required
Has Active Finetune

True when the set has a trained custom model.

boolean
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
{
"reference_sets": [
{
"category": "general"
}
]
}

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