Skip to content
  • Auto
  • Light
  • Dark
Log in to API

List

List
client.Models.List(ctx) (*[]IDstringCreatedint64ObjectLlamaModelObjectOwnedBystringLlamaModel, error)
get/models

Lists the currently available models, and provides basic information about each one.

Returns
ModelListResponseEnvelopeDatatype
[]IDstringCreatedint64ObjectLlamaModelObjectOwnedBystringLlamaModel
Hide ParametersShow Parameters
IDstring

The unique model identifier, which can be referenced in the API.

Createdint64

The creation time of the model.

ObjectLlamaModelObjectModelLlamaModelObjectLlamaModelObject

The object type, which is always "model"

Hide ParametersShow Parameters
LlamaModelObjectModelconst
"model"
OwnedBystring

The owner of the model.

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := llamaapi.NewClient(
    option.WithAPIKey("My API Key"),
  )
  llamaModels, err := client.Models.List(context.TODO())
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", llamaModels)
}
200 Example
{
  "data": [
    {
      "id": "id",
      "created": 0,
      "object": "model",
      "owned_by": "owned_by"
    }
  ],
  "object": "list"
}