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

# Modelle auflisten

> Listet alle verfügbaren Modelle auf

## Antwort

<ResponseField name="object" type="string">
  Immer `list`.
</ResponseField>

<ResponseField name="data" type="array">
  Array von Modellobjekten.

  Jedes Modell enthält immer:

  * `id` (string): Modellbezeichner
  * `object` (string): `model`
  * `created` (integer): Zeitstempel der Erstellung
  * `owned_by` (string): Modellanbieter
  * `tokenlab.aliases` (array): Öffentliche Aliase für dasselbe Modell
  * `tokenlab.pricing` (object): Skalare öffentliche Preiszusammenfassung
  * `tokenlab.capabilities` (array): Öffentliche Capability-Tags
  * `tokenlab.max_input_tokens` (number oder `null`): Eingabekontextlimit, sofern verfügbar
  * `tokenlab.max_output_tokens` (number oder `null`): Ausgabelimit, sofern verfügbar
  * `tokenlab.category` (string): Öffentliche Modellkategorie
  * `tokenlab.pricing_unit` (string): Öffentliche Preiseinheit
  * `tokenlab.has_complex_pricing` (boolean): Ob das Modell modellabhängige Preisdimen­sionen hat
  * `tokenlab.lifecycle` (object): Lifecycle-Status, Release-/Deprecation-Daten, Ersatzmodell und Latest-Badge-Quelle
  * `tokenlab.commercial` (object): Nutzer-Abrechnungsrichtlinie, Free-Grund und optionaler Free-until-Zeitpunkt
  * `tokenlab.badges` (array): Anzeige-Badges aus Lifecycle- und Commercial-Metadaten

  Bedingte Listenmetadaten:

  * `tokenlab.providers` (array): Öffentliche Anbieter, sofern verfügbar
  * `tokenlab.cache_pricing` (object oder `null`): Prompt-Cache-Preise, sofern verfügbar
  * `tokenlab.pricing_summary` (object oder `null`): Nur bei Modellen mit komplexer Preisstruktur enthalten
  * `tokenlab.request_format_summary` (object oder `null`): Leichte Nicht-Chat-Discovery-Zusammenfassung mit `public_operations`, `request_endpoint` und `request_endpoint_by_operation`
  * `tokenlab.agent_preferences` (object): Nur vorhanden, wenn `recommended_for` gesetzt ist

  Detail-only Felder wie `tokenlab.capability_flags`, `tokenlab.supported_operations`, `tokenlab.pricing_provenance` und `tokenlab.request_format_details` werden nur von `GET /v1/models/{model}` zurückgegeben.
</ResponseField>

<Note>
  `GET /v1/models` ist für Discovery optimiert. Detail-Metadaten wie `capability_flags`, `pricing_provenance` und das vollständige `request_format_details` liegen auf `GET /v1/models/{model}`.
</Note>

## Query-Parameter

<ParamField query="category" type="string">
  Optionaler Filter nach öffentlicher Kategorie. Unterstützt `chat`, `image`, `video`, `audio`, `tts`, `stt`, `music`, `3d`, `embedding`, `rerank` und `translation`.
</ParamField>

<ParamField query="recommended_for" type="string">
  Optionale Empfehlungsszene für Nicht-Chat-Modelle. Unterstützt `image`, `video`, `music`, `3d`, `tts`, `stt`, `embedding`, `rerank` und `translation`.
</ParamField>

<ParamField query="provider" type="string">
  Optionaler Filter nach Anbieter, z. B. `openai`, `anthropic`, `google` oder `deepseek`.
</ParamField>

<ParamField query="tag" type="string">
  Optionaler Modell-Tag-Filter, z. B. `chat`, `image`, `video`, `embedding` oder `translation`.
</ParamField>

<Note>
  Wenn `recommended_for` gesetzt ist, sortiert `/v1/models` Nicht-Chat-Modelle nach dem neuesten zwischengespeicherten 24-Stunden-Erfolgsraten-Snapshot. Modelle mit `status = "insufficient_samples"` bleiben sichtbar, werden aber hinter den bewerteten Modellen einsortiert.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.tokenlab.sh/v1/models" \
    -H "Authorization: Bearer sk-your-api-key"
  ```

  ```bash cURL theme={null}
  curl "https://api.tokenlab.sh/v1/models?recommended_for=image" \
    -H "Authorization: Bearer sk-your-api-key"
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="sk-your-api-key",
      base_url="https://api.tokenlab.sh/v1"
  )

  models = client.models.list()

  for model in models.data:
      print(f"{model.id} ({model.owned_by})")
  ```

  ```javascript JavaScript theme={null}
  import OpenAI from 'openai';

  const client = new OpenAI({
    apiKey: 'sk-your-api-key',
    baseURL: 'https://api.tokenlab.sh/v1'
  });

  const models = await client.models.list();

  for (const model of models.data) {
    console.log(`${model.id} (${model.owned_by})`);
  }
  ```

  ```go Go theme={null}
  package main

  import (
      "encoding/json"
      "fmt"
      "net/http"
  )

  func main() {
      req, _ := http.NewRequest("GET", "https://api.tokenlab.sh/v1/models", nil)
      req.Header.Set("Authorization", "Bearer sk-your-api-key")

      resp, _ := http.DefaultClient.Do(req)
      defer resp.Body.Close()

      var payload struct {
          Data []struct {
              ID      string `json:"id"`
              OwnedBy string `json:"owned_by"`
          } `json:"data"`
      }

      json.NewDecoder(resp.Body).Decode(&payload)

      for _, model := range payload.Data {
          fmt.Printf("%s (%s)\n", model.ID, model.OwnedBy)
      }
  }
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://api.tokenlab.sh/v1/models');

  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer sk-your-api-key'
      ]
  ]);

  $response = curl_exec($ch);
  curl_close($ch);

  $data = json_decode($response, true);
  foreach ($data['data'] as $model) {
      echo "{$model['id']} ({$model['owned_by']})\n";
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "object": "list",
    "data": [
      {
        "id": "gpt-5.4",
        "object": "model",
        "created": 1706000000,
        "owned_by": "openai"
      },
      {
        "id": "claude-sonnet-4-6",
        "object": "model",
        "created": 1706000000,
        "owned_by": "anthropic"
      },
      {
        "id": "gemini-3.5-flash",
        "object": "model",
        "created": 1706000000,
        "owned_by": "google"
      }
    ]
  }
  ```
</ResponseExample>

## Nach Anbieter filtern

```python theme={null}
# Get all OpenAI models
openai_models = [m for m in models.data if m.owned_by == "openai"]

# Get all Anthropic models
anthropic_models = [m for m in models.data if m.owned_by == "anthropic"]
```

## Modellkategorien

| Anbieter    | Beispielmodelle                                          |
| ----------- | -------------------------------------------------------- |
| `openai`    | gpt-5.4, gpt-5.4-mini, gpt-5-mini, gpt-4o, gpt-image-2   |
| `anthropic` | claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5     |
| `google`    | gemini-3.1-pro-preview, gemini-3.5-flash, gemini-2.5-pro |
| `deepseek`  | deepseek-r1, deepseek-v3-2                               |
| `xai`       | grok-4.1                                                 |
| `moonshot`  | kimi-k2.5                                                |
| `minimax`   | minimax-m3                                               |
| `meta`      | llama-3.3-70b, llama-3.1-405b                            |

## Beispiel für Agentenempfehlung

```json Response theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "gemini-2.5-flash-image",
      "object": "model",
      "created": 1706000000,
      "owned_by": "google",
      "tokenlab": {
        "category": "image",
        "pricing_unit": "per_request",
        "agent_preferences": {
          "image": {
            "preferred_rank": 1,
            "success_rate_24h": 0.98,
            "sample_count_24h": 423,
            "status": "ready",
            "updated_at": "2026-03-28T12:00:00.000Z",
            "basis": {
              "source": "recent_activity_24h"
            }
          }
        }
      }
    }
  ]
}
```

## Modelllöschung

`DELETE /v1/models/{model}` wird nicht unterstützt. TokenLab-Modelle sind ein gemeinsamer öffentlicher Katalog, keine nutzereigenen Fine-Tuning-Modellressourcen.
