Skip to content
FLORA DocsGo to app

List available models

client.models.list(ModelListParams { type } query?, RequestOptionsoptions?): ModelListResponse { models }
GET/models

Returns the public model catalog visible to API clients. Use the optional type filter to narrow results to image, video, audio, or text models.

ParametersExpand Collapse
query: ModelListParams { type }
type?: "image" | "video" | "audio" | "text"

Model type

One of the following:
"image"
"video"
"audio"
"text"
ReturnsExpand Collapse
ModelListResponse { models }
models: Array<Model>
capabilities: Array<string>

Model capabilities

estimated_credits: number

Estimated credits

minimum0
estimated_seconds: number

Estimated seconds

minimum0
model_id: string

Model identifier

minLength1
name: string

Model name

params: Array<Param>

Supported generation parameters for this model

name: string

Parameter name to pass in generation params

required: boolean

Whether the model requires this parameter

type: "string" | "string[]" | "bool" | 5 more

Parameter value type

One of the following:
"string"
"string[]"
"bool"
"int"
"int?"
"seed"
"float"
"dict"
default?: unknown

Default parameter value

description?: string

Parameter help text

label?: string

Human-readable parameter label

max?: number

Maximum numeric value

min?: number

Minimum numeric value

options?: Array<Option>

Allowed values for enum-like parameters

label: string

Displayed option label

value: string

Option value to pass in generation params

description?: string

Option description

properties?: Record<string, Properties>

Nested numeric properties for object parameters

default: number
max: number
min: number
provider: string

Model provider

type: "image" | "video" | "audio" | "text"

Model type

One of the following:
"image"
"video"
"audio"
"text"
beta?: boolean

Whether this model is in beta

List available models

import Flora from '@flora-ai/flora';

const client = new Flora({
  apiKey: process.env['FLORA_API_KEY'], // This is the default and can be omitted
});

const models = await client.models.list();

console.log(models.models);
{
  "models": [
    {
      "capabilities": [
        "string"
      ],
      "estimated_credits": 0,
      "estimated_seconds": 0,
      "model_id": "t2i-flux-2-pro",
      "name": "name",
      "params": [
        {
          "name": "name",
          "required": true,
          "type": "string",
          "default": {},
          "description": "description",
          "label": "label",
          "max": 0,
          "min": 0,
          "options": [
            {
              "label": "label",
              "value": "value",
              "description": "description"
            }
          ],
          "properties": {
            "foo": {
              "default": 0,
              "max": 0,
              "min": 0
            }
          }
        }
      ],
      "provider": "Black Forest Labs",
      "type": "image",
      "beta": true
    }
  ]
}
{
  "error": {
    "code": "input_validation_error",
    "message": "prompt: Required",
    "fields": [
      {
        "field": "prompt",
        "message": "Required"
      }
    ]
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid API key."
  }
}
{
  "error": {
    "code": "insufficient_credits",
    "message": "Insufficient credits."
  }
}
{
  "error": {
    "code": "forbidden",
    "message": "Forbidden."
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not found."
  }
}
{
  "error": {
    "code": "idempotency_duplicate",
    "message": "Duplicate idempotency key."
  }
}
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded."
  }
}
{
  "error": {
    "code": "unknown_error",
    "message": "An unknown error occurred."
  }
}
Returns Examples
{
  "models": [
    {
      "capabilities": [
        "string"
      ],
      "estimated_credits": 0,
      "estimated_seconds": 0,
      "model_id": "t2i-flux-2-pro",
      "name": "name",
      "params": [
        {
          "name": "name",
          "required": true,
          "type": "string",
          "default": {},
          "description": "description",
          "label": "label",
          "max": 0,
          "min": 0,
          "options": [
            {
              "label": "label",
              "value": "value",
              "description": "description"
            }
          ],
          "properties": {
            "foo": {
              "default": 0,
              "max": 0,
              "min": 0
            }
          }
        }
      ],
      "provider": "Black Forest Labs",
      "type": "image",
      "beta": true
    }
  ]
}
{
  "error": {
    "code": "input_validation_error",
    "message": "prompt: Required",
    "fields": [
      {
        "field": "prompt",
        "message": "Required"
      }
    ]
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid API key."
  }
}
{
  "error": {
    "code": "insufficient_credits",
    "message": "Insufficient credits."
  }
}
{
  "error": {
    "code": "forbidden",
    "message": "Forbidden."
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not found."
  }
}
{
  "error": {
    "code": "idempotency_duplicate",
    "message": "Duplicate idempotency key."
  }
}
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded."
  }
}
{
  "error": {
    "code": "unknown_error",
    "message": "An unknown error occurred."
  }
}