# Models

URL: https://docs.unli.dev/models

> List all available models

## OpenAPI specification

```json
{
  "openapi": "3.2.0",
  "info": {
    "title": "UNLI API",
    "version": "1.0.0",
    "description": "OpenAPI spec for UNLI API models endpoint."
  },
  "servers": [
    {
      "url": "https://api.unli.dev/v1",
      "description": "UNLI API"
    }
  ],
  "paths": {
    "/models": {
      "get": {
        "operationId": "listModels",
        "summary": "List all available models",
        "description": "Returns the models available to your API key. `unli-auto` and `auto` both route each request to a model automatically.",
        "tags": [
          "Models"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "A list of models was successfully returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Model"
                      }
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "object"
                  ]
                },
                "examples": {
                  "default": {
                    "summary": "Example response",
                    "value": {
                      "data": [
                        {
                          "id": "unli-auto",
                          "object": "model",
                          "name": "unli-auto",
                          "version": "auto",
                          "vendor": "UNLI",
                          "preview": false,
                          "model_picker_enabled": true,
                          "capabilities": {
                            "family": "auto",
                            "object": "model_capabilities",
                            "type": "chat",
                            "tokenizer": "o200k_base",
                            "limits": {
                              "max_context_window_tokens": 1048576,
                              "max_output_tokens": 65536,
                              "max_prompt_tokens": 1048576,
                              "vision": {
                                "max_prompt_image_size": 10485760,
                                "max_prompt_images": 10,
                                "supported_media_types": [
                                  "image/jpeg",
                                  "image/png",
                                  "image/webp",
                                  "image/gif"
                                ]
                              }
                            },
                            "supports": {
                              "parallel_tool_calls": true,
                              "streaming": true,
                              "structured_outputs": true,
                              "tool_calls": true,
                              "vision": true
                            }
                          }
                        },
                        {
                          "id": "auto",
                          "object": "model",
                          "name": "auto",
                          "version": "auto",
                          "vendor": "UNLI",
                          "preview": false,
                          "model_picker_enabled": true,
                          "capabilities": {
                            "family": "auto",
                            "object": "model_capabilities",
                            "type": "chat",
                            "tokenizer": "o200k_base",
                            "limits": {
                              "max_context_window_tokens": 1048576,
                              "max_output_tokens": 65536,
                              "max_prompt_tokens": 1048576,
                              "vision": {
                                "max_prompt_image_size": 10485760,
                                "max_prompt_images": 10,
                                "supported_media_types": [
                                  "image/jpeg",
                                  "image/png",
                                  "image/webp",
                                  "image/gif"
                                ]
                              }
                            },
                            "supports": {
                              "parallel_tool_calls": true,
                              "streaming": true,
                              "structured_outputs": true,
                              "tool_calls": true,
                              "vision": true
                            }
                          }
                        }
                      ],
                      "object": "list"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Bearer token authentication using API keys"
      }
    },
    "schemas": {
      "Model": {
        "type": "object",
        "description": "A model resource.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The model identifier to pass as `model` in requests, e.g. `unli-auto` or `auto`."
          },
          "object": {
            "type": "string",
            "enum": [
              "model"
            ],
            "description": "The object type."
          },
          "name": {
            "type": "string",
            "description": "The model name."
          },
          "version": {
            "type": "string",
            "description": "The model version."
          },
          "vendor": {
            "type": "string",
            "description": "The model vendor."
          },
          "preview": {
            "type": "boolean",
            "description": "Whether the model is in preview."
          },
          "model_picker_enabled": {
            "type": "boolean",
            "description": "Whether model picker is enabled for this model."
          },
          "capabilities": {
            "$ref": "#/components/schemas/ModelCapabilities"
          }
        },
        "required": [
          "id",
          "object",
          "name",
          "version",
          "vendor",
          "preview",
          "model_picker_enabled",
          "capabilities"
        ]
      },
      "ModelCapabilities": {
        "type": "object",
        "description": "Capabilities of the model.",
        "properties": {
          "family": {
            "type": "string",
            "description": "Model family."
          },
          "object": {
            "type": "string",
            "enum": [
              "model_capabilities"
            ],
            "description": "The object type."
          },
          "type": {
            "type": "string",
            "description": "Type of model (e.g., chat)."
          },
          "tokenizer": {
            "type": "string",
            "description": "Tokenizer used by the model."
          },
          "limits": {
            "$ref": "#/components/schemas/ModelLimits"
          },
          "supports": {
            "$ref": "#/components/schemas/ModelSupports"
          }
        },
        "required": [
          "family",
          "object",
          "type",
          "tokenizer",
          "limits",
          "supports"
        ]
      },
      "ModelLimits": {
        "type": "object",
        "description": "Limits for the model.",
        "properties": {
          "max_context_window_tokens": {
            "type": "integer",
            "description": "Maximum context window, in tokens."
          },
          "max_output_tokens": {
            "type": "integer",
            "description": "Maximum tokens the model can generate in one response."
          },
          "max_prompt_tokens": {
            "type": "integer",
            "description": "Maximum prompt length, in tokens."
          },
          "vision": {
            "$ref": "#/components/schemas/ModelVisionLimits"
          }
        },
        "required": [
          "max_context_window_tokens",
          "max_output_tokens",
          "max_prompt_tokens",
          "vision"
        ]
      },
      "ModelVisionLimits": {
        "type": "object",
        "description": "Vision-related limits for the model.",
        "properties": {
          "max_prompt_image_size": {
            "type": "integer",
            "description": "Maximum size of a single image, in bytes (10485760 = 10 MB)."
          },
          "max_prompt_images": {
            "type": "integer",
            "description": "Maximum number of images per prompt."
          },
          "supported_media_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Supported image media types."
          }
        },
        "required": [
          "max_prompt_image_size",
          "max_prompt_images",
          "supported_media_types"
        ]
      },
      "ModelSupports": {
        "type": "object",
        "description": "Supported features for the model.",
        "properties": {
          "parallel_tool_calls": {
            "type": "boolean",
            "description": "Supports parallel tool calls."
          },
          "streaming": {
            "type": "boolean",
            "description": "Supports streaming responses."
          },
          "structured_outputs": {
            "type": "boolean",
            "description": "Supports structured outputs."
          },
          "tool_calls": {
            "type": "boolean",
            "description": "Supports tool calls."
          },
          "vision": {
            "type": "boolean",
            "description": "Supports vision (image input)."
          }
        },
        "required": [
          "parallel_tool_calls",
          "streaming",
          "structured_outputs",
          "tool_calls",
          "vision"
        ]
      },
      "Error": {
        "type": "object",
        "description": "Error response payload.",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "code": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "message",
              "type"
            ]
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}
```
