Skip to main content

Overview

Retrieve detailed information about a specific model, including its capabilities, provider, and supported features.

Method Signature

client.models.retrieve(model_id: str) -> Model

Parameters

model_id
string
required
The ID of the model to retrieve (e.g., openai/gpt-4, anthropic/claude-3-5-sonnet-20241022).

Response

id
string
Unique model identifier with provider prefix (e.g., openai/gpt-4).
provider
string
Provider that hosts this model. One of: openai, anthropic, google, xai, mistral, groq, fireworks, deepseek, moonshot, cerebras.
created_at
string
When the model was released (RFC 3339 format).
display_name
string
Human-readable model name.
description
string
Model description.
version
string
Model version identifier.
capabilities
object
Normalized model capabilities across all providers.
defaults
object
Provider-declared default parameters for model generation.
provider_info
object
Raw provider-specific metadata.

Errors

  • 401: Authentication fails
  • 404: Model not found or not accessible with current API key
  • 500: Internal error occurs

Example

import dedalus_labs

client = dedalus_labs.Client(api_key="your-api-key")

model = client.models.retrieve("openai/gpt-4")

print(f"Model: {model.id}")
print(f"Provider: {model.provider}")
print(f"Display Name: {model.display_name}")

if model.capabilities:
    print(f"Supports vision: {model.capabilities.vision}")
    print(f"Max input tokens: {model.capabilities.input_token_limit}")

Response Example

{
  "id": "openai/gpt-4",
  "object": "model",
  "created_at": "2023-06-27T16:40:11Z",
  "provider": "openai",
  "display_name": "GPT-4",
  "capabilities": {
    "text": true,
    "vision": false,
    "tools": true,
    "streaming": true,
    "input_token_limit": 8192,
    "output_token_limit": 4096
  }
}

Build docs developers (and LLMs) love