Skip to content
FLORA DocsGo to app

List available models

client.Models.List(ctx, query) (*ModelListResponse, error)
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 param.Field[ModelListParamsType]Optional

Model type

const ModelListParamsTypeImage ModelListParamsType = "image"
const ModelListParamsTypeVideo ModelListParamsType = "video"
const ModelListParamsTypeAudio ModelListParamsType = "audio"
const ModelListParamsTypeText ModelListParamsType = "text"
ReturnsExpand Collapse
type ModelListResponse struct{…}
Models []ModelListResponseModel
Capabilities []string

Model capabilities

EstimatedCredits int64

Estimated credits

minimum0
EstimatedSeconds int64

Estimated seconds

minimum0
ModelID string

Model identifier

minLength1
Name string

Model name

Params []ModelListResponseModelParam

Supported generation parameters for this model

Name string

Parameter name to pass in generation params

Required bool

Whether the model requires this parameter

Type string

Parameter value type

One of the following:
const ModelListResponseModelParamTypeStringSnakeCase ModelListResponseModelParamType = "string"
const ModelListResponseModelParamTypeString ModelListResponseModelParamType = "string[]"
const ModelListResponseModelParamTypeBool ModelListResponseModelParamType = "bool"
const ModelListResponseModelParamTypeIntSnakeCase ModelListResponseModelParamType = "int"
const ModelListResponseModelParamTypeInt ModelListResponseModelParamType = "int?"
const ModelListResponseModelParamTypeSeed ModelListResponseModelParamType = "seed"
const ModelListResponseModelParamTypeFloat ModelListResponseModelParamType = "float"
const ModelListResponseModelParamTypeDict ModelListResponseModelParamType = "dict"
Default anyOptional

Default parameter value

Description stringOptional

Parameter help text

Label stringOptional

Human-readable parameter label

Max float64Optional

Maximum numeric value

Min float64Optional

Minimum numeric value

Options []ModelListResponseModelParamOptionOptional

Allowed values for enum-like parameters

Label string

Displayed option label

Value string

Option value to pass in generation params

Description stringOptional

Option description

Properties map[string, ModelListResponseModelParamProperty]Optional

Nested numeric properties for object parameters

Default float64
Max float64
Min float64
Provider string

Model provider

Type string

Model type

One of the following:
const ModelListResponseModelTypeImage ModelListResponseModelType = "image"
const ModelListResponseModelTypeVideo ModelListResponseModelType = "video"
const ModelListResponseModelTypeAudio ModelListResponseModelType = "audio"
const ModelListResponseModelTypeText ModelListResponseModelType = "text"
Beta boolOptional

Whether this model is in beta

List available models

package main

import (
  "context"
  "fmt"

  "github.com/florafauna-ai/flora-go"
  "github.com/florafauna-ai/flora-go/option"
)

func main() {
  client := flora.NewClient(
    option.WithAPIKey("My API Key"),
  )
  models, err := client.Models.List(context.TODO(), flora.ModelListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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."
  }
}