Skip to content
  • Auto
  • Light
  • Dark

Retrieve

Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
models.retrieve(strmodel) -> idstrcreatedintobjectliteralowned_bystrModelRetrieveResponse
get/models/{model}

Retrieves a model instance, providing basic information about the model such as the owner and permissioning.

Parameters
modelstr
Returns
ModelRetrieveResponseclass

Describes a model offering that can be used with the API.

Hide ParametersShow Parameters
idstr

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

createdint

The Unix timestamp (in seconds) when the model was created.

objectliteral
Literal["model"]

The object type, which is always "model".

Hide ParametersShow Parameters
"model"
owned_bystr

The organization that owns the model.

from do_gradientai import GradientAI

client = GradientAI(
    api_key="My API Key",
)
model = client.models.retrieve(
    "llama3-8b-instruct",
)
print(model.id)
200 Example
{
  "id": "id",
  "created": 0,
  "object": "model",
  "owned_by": "owned_by"
}