메인 콘텐츠로 건너뛰기

응답

object
string
항상 list입니다.
data
array
모델 객체 배열입니다.각 모델에는 항상 다음이 포함됩니다:
  • id (string): 모델 식별자
  • object (string): model
  • created (integer): 생성 타임스탬프
  • owned_by (string): 모델 제공자
  • tokenlab.aliases (array): 같은 모델의 공개 별칭
  • tokenlab.pricing (object): 스칼라 공개 가격 요약
  • tokenlab.capabilities (array): 공개 기능 태그
  • tokenlab.max_input_tokens (number 또는 null): 사용 가능한 경우 입력 컨텍스트 한도
  • tokenlab.max_output_tokens (number 또는 null): 사용 가능한 경우 출력 한도
  • tokenlab.category (string): 공개 모델 카테고리
  • tokenlab.pricing_unit (string): 공개 가격 단위
  • tokenlab.has_complex_pricing (boolean): 모델별 가격 차원이 있는지 여부
  • tokenlab.lifecycle (object): 수명 주기 단계, 출시/사용 중단 날짜, 대체 모델, latest 배지 출처
  • tokenlab.commercial (object): 사용자 과금 정책, 무료 사유, 선택적 무료 종료 시각
  • tokenlab.badges (array): 수명 주기와 상업 메타데이터에서 파생된 표시 배지
조건부 목록 메타데이터:
  • tokenlab.providers (array): 사용 가능한 경우 공개 제공자
  • tokenlab.cache_pricing (object 또는 null): 사용 가능한 경우 prompt cache 가격
  • tokenlab.pricing_summary (object 또는 null): 복잡한 가격 모델에서만 반환됩니다
  • tokenlab.request_format_summary (object 또는 null): public_operations, request_endpoint, request_endpoint_by_operation 를 포함하는 간단한 비채팅 탐색 요약
  • tokenlab.agent_preferences (object): recommended_for 가 있을 때만 반환
tokenlab.capability_flags, tokenlab.supported_operations, tokenlab.pricing_provenance, tokenlab.request_format_details 같은 상세 전용 필드는 GET /v1/models/{model} 에서만 반환됩니다.
GET /v1/models 는 탐색에 최적화되어 있습니다. capability_flags, pricing_provenance, 전체 request_format_details 같은 상세 전용 메타데이터는 GET /v1/models/{model} 에 있습니다.

쿼리 파라미터

category
string
선택 사항인 공개 카테고리 필터입니다. chat, image, video, audio, tts, stt, music, 3d, embedding, rerank, translation 을 지원합니다.
선택 사항인 비채팅 추천 장면입니다. image, video, music, 3d, tts, stt, embedding, rerank, translation 을 지원합니다.
provider
string
선택 사항인 공급자 필터입니다. 예: openai, anthropic, google, deepseek.
tag
string
선택 사항인 모델 태그 필터입니다. 예: chat, image, video, embedding, translation.
recommended_for 가 있을 때 /v1/models 는 비채팅 모델을 최신 캐시된 24시간 성공률 스냅샷 기준으로 정렬합니다. status = "insufficient_samples" 인 모델은 계속 보이지만 점수화된 모델 뒤에 정렬됩니다.
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"
    }
  ]
}

공급자별 필터링

# 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"]

모델 카테고리

공급자예시 모델
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

에이전트 추천 예시

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"
            }
          }
        }
      }
    }
  ]
}

모델 삭제

DELETE /v1/models/{model}은 지원되지 않습니다. TokenLab 모델은 공유 공개 카탈로그이며 사용자 소유 fine-tuned 모델 리소스가 아닙니다.