Skip to content

For AI agents: every API docs page in one plain-text file is at /docs/llms-full.txt, and the documentation index is at /llms.txt. This page is available as Markdown at https://diffio.ai/docs/api-reference/list-models.md, and every docs URL returns Markdown when requested with Accept: text/markdown.

List models

Lists every model ID accepted when creating a generation, along with its status (hosted, alias, or retired), serving model, and hourly USD list price. Public; requires no API key.

GET https://api.diffio.ai/v2/models

  • Key scope: None (public)
  • Auth header: No API key needed
  • Body: None

Request

Takes no parameters, headers, or request body.

Request

from diffio import DiffioClient

# A public call: no API key needed.
client = DiffioClient()

models = client.models.list()

Response

Returns a list object containing all model entries (next_cursor is always null).

Success: 200OK.

Response fields

FieldTypePresentDescription
#objectstringAlwaysResource type, always "list".list
#dataarrayAlwaysAll accepted model entries: hosted models first, then tier aliases (diffio-flash, diffio-pro), then retired model names.Fields below
#next_cursorstring | nullAlwaysAlways null; all models are returned in one response.
data[] 6 fields
FieldTypePresentDescription
#data[].idstringAlwaysModel identifier accepted in model when creating a generation.
#data[].objectstringAlwaysResource type, always "model".model
#data[].statusstringAlwayshosted for active models, alias for rolling tier pointers, or retired for older names that substitute to a hosted model.hostedaliasretired
#data[].labelstring | nullAlwaysDisplay name for hosted models and aliases, or null for retired model names.
#data[].served_bystringAlwaysHosted model ID that executes generations requesting this model.
#data[].price_per_hour_usdnumberAlwaysHourly list price in USD (5 for Flash, 10 for Pro; retired models report the lower of their last list price and served_by).

Response 200OK.

Return codes

  • 200OK.Returns every model entry with its serving model and hourly USD price.
  • 405Client error.Same on every endpoint
    • 405Client error. HTTP method not supported on this path; check the Allow header (code method_not_allowed).

Example error response

Error response
{
  "error": {
    "code": "method_not_allowed",
    "message": "/models accepts GET.",
    "request_id": "70968c6cd6534e1e9f1547f19966f424"
  }
}

Notes

  • Pass diffio-flash or diffio-pro to always run the newest hosted model in that tier without changing your code.
  • Requests naming a retired model run on served_by with substituted: true on the generation and bill the lower of the two list prices.
  • See Models for quality and speed guidance between Flash and Pro.

Report an issue with this page