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

Retrieve

Retrieve
client.Models.Get(ctx, model) (*IDstringCreatedint64ObjectLlamaModelObjectOwnedBystringLlamaModel, error)
get/models/{model}
Parameters
modelstring
Returns
IDstringCreatedint64ObjectLlamaModelObjectOwnedBystringLlamaModel
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"),
  )
  llamaModel, err := client.Models.Get(context.TODO(), "Llama-3.3-70B-Instruct")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", llamaModel.ID)
}
200 Example
{
  "id": "id",
  "created": 0,
  "object": "model",
  "owned_by": "owned_by"
}