GET /v1/models is the live contract for every model: operations,
request schemas, accepted and returned media, and availability. It
changes as models are added and retired, so read it at runtime rather
than pinning a fixed list. A model’s
id is publisher/model, which is also the path for
POST /v1/run/{model_id}.
List models
data is one model’s contract.
A model with
available set to false rejects runs before any credits
are reserved, returning error.code: "model.not_available".
Filter by what a model produces
Filter onoutput_modalities, whose values are video, image,
audio, and model.3d.
Retrieve one model
operations and request_schemas define the request.
Operations
operations is keyed by operation name. Each declares its media inputs
as roles, its parameter names, and any dependencies between roles.
role_dependencies returns
error.code: "run.input_role_dependency". Here last_frame requires
first_frame. A combination the model will not accept returns
error.code: "run.input_role_conflict", naming the fields involved.
A model with several operations requires operation on every request.
Omitting it returns error.code: "run.operation_required" with the valid
names.
Request schemas
request_schemas holds the JSON Schema for each operation, covering
types, enums, defaults, and bounds. additionalProperties is false, so
an unrecognized field is rejected rather than ignored.
error.code: "run.parameter_invalid", naming the field.
Metering
pricing describes how a model meters, not what it charges. meter is
output_seconds, which bills by the duration of the output, or
request, which is a flat cost per call.
Some duration-metered models also carry rounding and a duration_basis
that says whether the meter counts the duration requested or the duration
delivered. Request-metered models carry minimum_credits.
Credits and limits covers what a run is actually
charged.
