# Models

## List available models

`client.models.list(ModelListParamsquery?, RequestOptionsoptions?): ModelListResponse`

**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.

### Parameters

- `query: ModelListParams`

  - `type?: "image" | "video" | "audio" | "text"`

    Model type

    - `"image"`

    - `"video"`

    - `"audio"`

    - `"text"`

### Returns

- `ModelListResponse`

  - `models: Array<Model>`

    - `capabilities: Array<string>`

      Model capabilities

    - `estimated_credits: number`

      Estimated credits

    - `estimated_seconds: number`

      Estimated seconds

    - `model_id: string`

      Model identifier

    - `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

        - `"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

      - `"image"`

      - `"video"`

      - `"audio"`

      - `"text"`

    - `beta?: boolean`

      Whether this model is in beta

### Example

```typescript
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);
```

#### Response

```json
{
  "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
    }
  ]
}
```

## Domain Types

### Model List Response

- `ModelListResponse`

  - `models: Array<Model>`

    - `capabilities: Array<string>`

      Model capabilities

    - `estimated_credits: number`

      Estimated credits

    - `estimated_seconds: number`

      Estimated seconds

    - `model_id: string`

      Model identifier

    - `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

        - `"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

      - `"image"`

      - `"video"`

      - `"audio"`

      - `"text"`

    - `beta?: boolean`

      Whether this model is in beta
