Skip to content
GitHubLog inStart free
cetra is not released yet. These docs describe the development version.

List model prices

GET
/api/v1/projects/{project}/models
curl --request GET \
--url 'http://localhost:8080/api/v1/projects/example/models?scope=builtin&limit=50' \
--cookie cetra_session=<cetra_session>

Any project member can read; a read API key too.

project
required
string

Project UUID, URL-encoded org-slug/project-slug, or current.

scope

Who owns a price row. Project beats org, which beats built-in (spec 02 rule 2).

string
Allowed values: builtin org project

Only rows of this scope.

q
string

Case-insensitive substring of model_name.

limit

Page size. Default 50, accepted range 1–1000.

Spec 09 § Conventions.

integer format: int32
default: 50 >= 1 <= 1000

Maximum number of items to return (1–1000, default 50).

cursor
string

Opaque cursor from a previous page.

One page of the project’s effective price table.

Media typeapplication/json

One page of results. next_cursor is null when there is no next page.

object
data
required

Items in this page.

Array<object>

A price row.

object
created_at

Creation time. Absent on built-in rows. JSON is RFC 3339.

string format: date-time
id

Row id. Absent on built-in rows.

string format: uuid
match_pattern
required

Regular expression matched against the span’s model, anchored and case-insensitive.

string
model_name
required

Display name.

string
price_cache_read

USD per 1M cache-read tokens.

number format: double
price_cache_write

USD per 1M cache-write tokens.

number format: double
price_input

USD per 1M uncached input tokens.

number format: double
price_output

USD per 1M output tokens.

number format: double
price_reasoning

USD per 1M reasoning tokens. Absent: the output price.

number format: double
provider

When set, the row prices spans of this provider (or with none).

string
scope
required

Who owns the row.

string
Allowed values: builtin org project
tiers
required

Long-context bands, by increasing min_input_tokens. Empty when none.

Array<object>

One long-context band. A null price uses the row’s base price.

object
min_input_tokens
required

The band applies when the span’s input tokens (cache included) are at least this count.

integer format: int64
price_cache_read

USD per 1M cache-read tokens.

number format: double
price_cache_write

USD per 1M cache-write tokens.

number format: double
price_input

USD per 1M uncached input tokens.

number format: double
price_output

USD per 1M output tokens.

number format: double
price_reasoning

USD per 1M reasoning tokens.

number format: double
updated_at

Last change. Absent on built-in rows. JSON is RFC 3339.

string format: date-time
valid_from
required

The row prices spans that started at or after this time. JSON is RFC 3339.

string format: date-time
next_cursor
required

Opaque cursor for the next page, or null when this is the last page.

string | null

Example

{
"data": [
{
"scope": "builtin"
}
]
}

The request is malformed or a filter is invalid.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

No credentials, or the credentials are invalid.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The resource does not exist.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

Too many requests.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}