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

# List Models

> GET /v1/models — Retrieve the list of available models on the platform

Retrieve the list of currently available models and their capability information. Use this to discover models available for `/v1/chat/completions` and `/v1/agents/run`.

```
GET https://api.profy.cn/v1/models
```

## Authentication

<ParamField header="Authorization" type="string" required>
  `Bearer sk-pro-xxxx` (API Key)
</ParamField>

## Request Examples

<CodeGroup>
  ```python Python theme={null}
  from profy import Profy

  async with Profy(api_key="sk-pro-your-key") as client:
      models = await client.models.list()
      for m in models:
          print(f"{m['id']}: {m['name']}")
          caps = m.get("capabilities", {})
          if caps.get("supportsVision"):
              print("  Supports vision")
          if caps.get("supportsTools"):
              print("  Supports tool calling")
  ```

  ```typescript TypeScript theme={null}
  import { Profy } from "@profy-ai/sdk";

  const client = new Profy({ apiKey: "sk-pro-your-key" });

  const models = await client.models.list();
  for (const m of models) {
    console.log(`${m.id}: ${m.name}`);
    if (m.capabilities?.supportsVision) console.log("  Supports vision");
    if (m.capabilities?.supportsTools) console.log("  Supports tool calling");
  }
  ```

  ```bash curl theme={null}
  curl https://api.profy.cn/v1/models \
    -H "Authorization: Bearer sk-pro-your-key"
  ```
</CodeGroup>

## Response

```json theme={null}
{
  "models": [
    {
      "id": "deepseek-v3",
      "type": "model",
      "name": "DeepSeek V3",
      "capabilities": {
        "omitTemperature": false,
        "fixedTemperature": null,
        "requiresReasoning": false,
        "maxInputTokens": 65536,
        "maxOutputTokens": 8192,
        "supportsTools": true,
        "supportsVision": false
      }
    },
    {
      "id": "claude-sonnet-4-20250514",
      "type": "model",
      "name": "Claude Sonnet 4",
      "capabilities": {
        "omitTemperature": false,
        "fixedTemperature": null,
        "requiresReasoning": false,
        "maxInputTokens": 200000,
        "maxOutputTokens": 16384,
        "supportsTools": true,
        "supportsVision": true
      }
    },
    {
      "id": "profy-financial-advisor",
      "type": "expert",
      "name": "Financial Advisor",
      "description": "Professional financial analysis and planning expert",
      "created": 1752825600,
      "owned_by": "creator-xxx"
    }
  ]
}
```

## Model Object

| Field          | Type     | Description                                                                                              |
| -------------- | -------- | -------------------------------------------------------------------------------------------------------- |
| `id`           | `string` | Model identifier, use this value in API calls                                                            |
| `type`         | `string` | `"model"` (raw LLM) or `"expert"` (Profy Expert, use via `profy-<identifier>` in `/v1/chat/completions`) |
| `name`         | `string` | Model display name                                                                                       |
| `capabilities` | `object` | Model capability description, only returned for `type: "model"` (see table below)                        |
| `description`  | `string` | Expert description, only returned for `type: "expert"`                                                   |
| `created`      | `number` | Creation timestamp (seconds), only returned for `type: "expert"`                                         |
| `owned_by`     | `string` | Creator identifier, only returned for `type: "expert"`                                                   |

## Capabilities Fields

| Field               | Type             | Description                                                  |
| ------------------- | ---------------- | ------------------------------------------------------------ |
| `omitTemperature`   | `boolean`        | Whether the temperature parameter should be omitted          |
| `fixedTemperature`  | `number \| null` | Fixed temperature value. `null` means freely configurable    |
| `requiresReasoning` | `boolean`        | Whether this is a reasoning model (produces thinking output) |
| `maxInputTokens`    | `number \| null` | Maximum input token count                                    |
| `maxOutputTokens`   | `number \| null` | Maximum output token count                                   |
| `supportsTools`     | `boolean`        | Whether Function Calling is supported                        |
| `supportsVision`    | `boolean`        | Whether image understanding is supported                     |

## Use Cases

### Filter Models by Capability

```python theme={null}
async with Profy(api_key="sk-pro-your-key") as client:
    models = await client.models.list()

    tool_models = [m for m in models if m["capabilities"]["supportsTools"]]
    vision_models = [m for m in models if m["capabilities"]["supportsVision"]]

    best_context = max(
        models,
        key=lambda m: m["capabilities"].get("maxInputTokens") or 0,
    )
```

### Filter Expert Models

```python theme={null}
async with Profy(api_key="sk-pro-your-key") as client:
    models = await client.models.list()

    expert_models = [m for m in models if m.get("type") == "expert"]
    for e in expert_models:
        print(f"{e['id']}: {e['name']} — {e.get('description', '')}")
```

### Handle Temperature Differences

Different models have different temperature parameter support. Checking capabilities before calling avoids request rejections:

```python theme={null}
caps = model_map[target]["capabilities"]

params = {"model": target, "messages": messages}

if not caps["omitTemperature"]:
    if caps["fixedTemperature"] is not None:
        params["temperature"] = caps["fixedTemperature"]
    else:
        params["temperature"] = 0.7

resp = await client.chat.completions.create(**params)
```

<Tip>
  The list of available models on the platform is updated periodically. We recommend your application call this endpoint at startup or on a regular schedule to get the latest list.
</Tip>

## Error Codes

| HTTP Status Code | Description           |
| ---------------- | --------------------- |
| `401`            | Authentication failed |

## Next Steps

<CardGroup cols={2}>
  <Card title="Chat Completions" icon="comments" href="/en/developers/api/chat-completions">
    Use models for chat completions
  </Card>

  <Card title="Run an Expert" icon="robot" href="/en/developers/api/agents-run">
    Invoke an Expert Agent
  </Card>
</CardGroup>
