Light Logo
CLI (v0.40.0)Reference

wriftai models list

CLI reference for wriftai models list

wriftai models list

List models

wriftai models list [flags]

Examples

  List models. By default the first page is returned
  $ wriftai models list

  Filter models owned by a specific user
  $ wriftai models list --owner user-001

  Filter models by category slugs
  $ wriftai models list --category-slugs image-to-text,voice-to-image

  Sort models by creation date in ascending order
  $ wriftai models --sort-by created_at --sort-direction asc

  Sort models by creation date in descending order
  $ wriftai models --sort-by created_at --sort-direction desc

  Sort models by prediction count in descending order
  $ wriftai models --sort-by prediction_count --sort-direction desc

  List models with a custom number of results per page. By default the first page is returned
  $ wriftai models list --page-size 10

  Retrieve a page using a specific cursor
  $ wriftai models list --cursor Y3Vyc29yLXZhbHVlLXRlc3Q=

  Paginate through the next pages until the end using jq
  $ cursor=""
  $ while true; do
      resp=$(wriftai models list --cursor "$cursor")
      echo "$resp" | jq .
      cursor=$(echo "$resp" | jq -r '.next_cursor // empty')
      [ -z "$cursor" ] && break
    done

  Paginate through the previous pages until the beginning using jq
  $ cursor="Y3Vyc29yLXZhbHVlLXRlc3Q="   # some current page cursor
  $ while true; do
      resp=$(wriftai models list --cursor "$cursor")
      echo "$resp" | jq .
      cursor=$(echo "$resp" | jq -r '.previous_cursor // empty')
      [ -z "$cursor" ] && break
    done

Options

      --category-slugs strings   The list of category slugs to filter models
      --cursor string            Pagination cursor
  -h, --help                     help for list
  -o, --output format            Set output format. Supported formats: json, yaml (default json)
      --owner string             Filter models by owner
      --page-size int            Number of items per page
      --sort-by string           Sorting criteria
      --sort-direction string    Sorting direction

Options inherited from parent commands

      --debug   Enable debug mode

SEE ALSO