> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dedaluslabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Model

> Retrieve a model.

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

Args:
    model_id: The ID of the model to retrieve (e.g., 'openai/gpt-4', 'anthropic/claude-3-5-sonnet-20241022')
    user: Authenticated user obtained from API key validation

Returns:
    Model: Information about the requested model

Raises:
    HTTPException:
        - 401 if authentication fails
        - 404 if model not found or not accessible with current API key
        - 500 if internal error occurs

Requires:
    Valid API key with 'read' scope permission

Example:
    ```python
    import dedalus_sdk

    client = dedalus_sdk.Client(api_key="your-api-key")
    model = client.models.retrieve("openai/gpt-4")

    print(f"Model: {model.id}")
    print(f"Owner: {model.owned_by}")
    ```

    Response:
    ```json
    {
        "id": "openai/gpt-4",
        "object": "model",
        "created": 1687882411,
        "owned_by": "openai"
    }
    ```

## Overview

Retrieve detailed information about a specific model, including capabilities,
pricing, token limits, and routing.

The `model_id` uses the `provider/model` format (e.g., `openai/gpt-4o`,
`anthropic/claude-opus-4-5`).

## Usage Examples

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl https://api.dedaluslabs.ai/v1/models/openai/gpt-4o \
    -H "x-api-key: $DEDALUS_API_KEY"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from dedalus_labs import Dedalus

  client = Dedalus(api_key="YOUR_API_KEY")

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

  print(f"Model: {model.display_name}")
  print(f"Context window: {model.token_limits.input:,} tokens")
  print(f"Pricing: ${model.pricing.input_per_million}/M input")
  ```

  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Dedalus } from "dedalus-labs";

  const client = new Dedalus({
    apiKey: "YOUR_API_KEY",
  });

  const model = await client.models.retrieve("openai/gpt-4o");
  console.log(model.display_name, model.pricing);
  ```
</CodeGroup>

## Example Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "openai/gpt-4o",
  "provider": "openai",
  "created_at": "2024-05-13T00:00:00Z",
  "display_name": "GPT-4o",
  "description": "Fast, multimodal flagship model.",
  "capabilities": {
    "text": true,
    "vision": true,
    "tools": true,
    "structured_output": true,
    "streaming": true
  },
  "token_limits": {
    "input": 128000,
    "output": 16384
  },
  "pricing": {
    "input_per_million": 2.5,
    "output_per_million": 10.0,
    "cached_input_per_million": 1.25
  },
  "provider_info": {
    "routing": [
      {
        "endpoint": "/v1/chat/completions",
        "upstream_api": "openai/chat/completions"
      }
    ],
    "status": "enabled"
  }
}
```


## OpenAPI

````yaml openapi.json GET /v1/models/{model_id}
openapi: 3.1.0
info:
  title: Dedalus API
  description: >-
    MCP gateway for AI agents. Mix-and-match any model with any tool from our
    marketplace.


    ## Authentication

    Use Bearer token or X-API-Key header authentication:

    ```

    Authorization: Bearer your-api-key-here

    ```

    ```

    x-api-key: your-api-key-here

    ```


    ## Available Endpoints

    - **GET /v1/models**: list available models

    - **POST /v1/chat/completions**: Chat completions with MCP tools

    - **GET /health**: Service health check
  version: 0.0.1
servers:
  - url: https://api.dedaluslabs.ai
    description: Official Dedalus API
security: []
paths:
  /v1/models/{model_id}:
    get:
      tags:
        - V1
        - V1
      summary: Retrieve Model
      description: >-
        Retrieve a model.


        Retrieve detailed information about a specific model, including its
        capabilities,

        provider, and supported features.


        Args:
            model_id: The ID of the model to retrieve (e.g., 'openai/gpt-4', 'anthropic/claude-3-5-sonnet-20241022')
            user: Authenticated user obtained from API key validation

        Returns:
            Model: Information about the requested model

        Raises:
            HTTPException:
                - 401 if authentication fails
                - 404 if model not found or not accessible with current API key
                - 500 if internal error occurs

        Requires:
            Valid API key with 'read' scope permission

        Example:
            ```python
            import dedalus_sdk

            client = dedalus_sdk.Client(api_key="your-api-key")
            model = client.models.retrieve("openai/gpt-4")

            print(f"Model: {model.id}")
            print(f"Owner: {model.owned_by}")
            ```

            Response:
            ```json
            {
                "id": "openai/gpt-4",
                "object": "model",
                "created": 1687882411,
                "owned_by": "openai"
            }
            ```
      operationId: retrieve_model_v1_models__model_id__get
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            title: Model Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: typescript
          label: Typescript
          source: |-
            const client = new Dedalus();

            const result = await client.models.retrieve(modelID);
        - lang: python
          label: Python
          source: |-
            client = Dedalus()

            result = client.models.retrieve(model_id)
        - lang: go
          label: Go
          source: |-
            client := dedalus.NewClient()

            result, err := client.Models.Get(ctx, modelID string)
components:
  schemas:
    Model:
      properties:
        id:
          type: string
          title: Id
          description: Unique model identifier with provider prefix (e.g., 'openai/gpt-4')
        provider:
          $ref: '#/components/schemas/Provider'
          description: Provider that hosts this model
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the model was released (RFC 3339)
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
          description: Human-readable model name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Model description
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
          description: Model version identifier
        capabilities:
          anyOf:
            - $ref: '#/components/schemas/ModelCapabilities'
            - type: 'null'
          description: Normalized model capabilities
        defaults:
          anyOf:
            - $ref: '#/components/schemas/ModelDefaults'
            - type: 'null'
          description: Provider-declared default parameters
        provider_info:
          anyOf:
            - $ref: '#/components/schemas/ModelProviderInfo'
            - type: 'null'
          description: Typed provider-specific metadata
        provider_declared_generation_methods:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Provider Declared Generation Methods
          description: Provider-specific generation method names (None = not declared)
      type: object
      required:
        - id
        - provider
        - created_at
      title: Model
      description: |-
        Unified model metadata across all providers.

        Combines provider-specific schemas into a single, consistent format.
        Fields that aren't available from a provider are set to None.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Provider:
      type: string
      enum:
        - openai
        - anthropic
        - google
        - xai
        - deepseek
        - mistral
        - groq
        - fireworks
        - cohere
        - together
        - cerebras
        - perplexity
        - moonshot
      title: Provider
      description: Supported LLM providers.
    ModelCapabilities:
      properties:
        text:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Text
          description: Supports text generation
        vision:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Vision
          description: Supports image understanding
        image_generation:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Image Generation
          description: Supports image generation
        audio:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Audio
          description: Supports audio processing
        tools:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Tools
          description: Supports function/tool calling
        structured_output:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Structured Output
          description: Supports structured JSON output
        streaming:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Streaming
          description: Supports streaming responses
        thinking:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Thinking
          description: Supports extended thinking/reasoning
        input_token_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Input Token Limit
          description: Maximum input tokens
        output_token_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Output Token Limit
          description: Maximum output tokens
      type: object
      title: ModelCapabilities
      description: Normalized model capabilities across all providers.
    ModelDefaults:
      properties:
        temperature:
          anyOf:
            - type: number
            - type: 'null'
          title: Temperature
          description: Default temperature setting
        top_p:
          anyOf:
            - type: number
            - type: 'null'
          title: Top P
          description: Default top_p setting
        top_k:
          anyOf:
            - type: integer
            - type: 'null'
          title: Top K
          description: Default top_k setting
        max_output_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Output Tokens
          description: Default maximum output tokens
      type: object
      title: ModelDefaults
      description: Provider-declared default parameters for model generation.
    ModelProviderInfo:
      properties:
        routing:
          items:
            $ref: '#/components/schemas/ModelProviderRoute'
          type: array
          title: Routing
          description: Per-endpoint upstream routing metadata
        status:
          $ref: '#/components/schemas/ModelStatus'
          description: Availability status
      type: object
      required:
        - routing
        - status
      title: ModelProviderInfo
      description: Typed provider metadata surfaced to SDKs.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ModelProviderRoute:
      properties:
        endpoint:
          $ref: '#/components/schemas/Endpoint'
          description: Dedalus endpoint path
        upstream_api:
          $ref: '#/components/schemas/UpstreamAPI'
          description: Provider API used for this endpoint
      type: object
      required:
        - endpoint
        - upstream_api
      title: ModelProviderRoute
      description: One endpoint -> upstream routing entry exposed by `/v1/models`.
    ModelStatus:
      type: string
      enum:
        - enabled
        - disabled
        - preview
        - deprecated
      title: ModelStatus
      description: Model availability status.
    Endpoint:
      type: string
      enum:
        - /v1/chat/completions
        - /v1/responses
        - /v1/embeddings
        - /v1/images/generations
        - /v1/audio/speech
        - /v1/audio/transcriptions
        - /v1/moderations
      title: Endpoint
      description: API endpoints we expose.
    UpstreamAPI:
      type: string
      enum:
        - openai/chat/completions
        - openai/responses
        - openai/embeddings
        - openai/images
        - openai/audio/speech
        - openai/audio/transcriptions
        - anthropic/messages
        - google/generateContent
        - google/embedContent
        - xai/chat/completions
        - openai-compatible
      title: UpstreamAPI
      description: Upstream provider API types.
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````