Zum Hauptinhalt springen

Antwort

object
string
Immer list.
data
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.
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}.

Query-Parameter

category
string
Optionaler Filter nach öffentlicher Kategorie. Unterstützt chat, image, video, audio, tts, stt, music, 3d, embedding, rerank und translation.
Optionale Empfehlungsszene für Nicht-Chat-Modelle. Unterstützt image, video, music, 3d, tts, stt, embedding, rerank und translation.
provider
string
Optionaler Filter nach Anbieter, z. B. openai, anthropic, google oder deepseek.
tag
string
Optionaler Modell-Tag-Filter, z. B. chat, image, video, embedding oder translation.
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.
curl "https://api.tokenlab.sh/v1/models" \
  -H "Authorization: Bearer sk-your-api-key"
curl "https://api.tokenlab.sh/v1/models?recommended_for=image" \
  -H "Authorization: Bearer sk-your-api-key"
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})")
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})`);
}
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
$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";
}
{
  "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"
    }
  ]
}

Nach Anbieter filtern

# 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

AnbieterBeispielmodelle
openaigpt-5.4, gpt-5.4-mini, gpt-5-mini, gpt-4o, gpt-image-2
anthropicclaude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5
googlegemini-3.1-pro-preview, gemini-3.5-flash, gemini-2.5-pro
deepseekdeepseek-r1, deepseek-v3-2
xaigrok-4.1
moonshotkimi-k2.5
minimaxminimax-m3
metallama-3.3-70b, llama-3.1-405b

Beispiel für Agentenempfehlung

Response
{
  "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.