> ## 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.

# 料金情報の取得

> モデルの料金情報を取得します

## 概要

このエンドポイントでは、現在公開されているアクティブなモデルの料金面を一覧できます。

ある 1 つのモデルの完全な料金詳細や構造化された料金・出典情報を確認する場合は、[モデル料金の取得](/api-reference/models/get-model) を優先してください。

## クエリパラメータ

<ParamField query="provider" type="string">
  `openai`、`anthropic`、`google` などの任意のプロバイダーフィルタです。
</ParamField>

<ParamField query="tag" type="string">
  `chat`、`image`、`video`、`embedding`、`translation` などの任意のモデルタグフィルタです。
</ParamField>

## レスポンス

<ResponseField name="object" type="string">
  常に `pricing` です。
</ResponseField>

<ResponseField name="updated_at" type="string">
  レスポンスに含まれる最新の料金エントリの ISO タイムスタンプです。
</ResponseField>

<ResponseField name="currency" type="string">
  常に `USD` です。
</ResponseField>

<ResponseField name="data" type="array">
  料金エントリの配列です。各項目には `model`、`provider`、`is_lock_price`、`capabilities`、`aliases`、および上のインタラクティブ schema が返す公開のスカラー値または構造化された料金サマリー項目が含まれます。
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.tokenlab.sh/v1/pricing?provider=openai&tag=chat" \
    -H "Authorization: Bearer sk-your-api-key"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.tokenlab.sh/v1/pricing",
      headers={"Authorization": "Bearer sk-your-api-key"},
      params={"provider": "openai", "tag": "chat"}
  )

  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.tokenlab.sh/v1/pricing?provider=openai&tag=chat',
    {
      headers: { 'Authorization': 'Bearer sk-your-api-key' }
    }
  );

  const data = await response.json();
  console.log(data);
  ```

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

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

  func main() {
      req, _ := http.NewRequest("GET", "https://api.tokenlab.sh/v1/pricing?provider=openai&tag=chat", nil)
      req.Header.Set("Authorization", "Bearer sk-your-api-key")

      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()

      var result map[string]interface{}
      json.NewDecoder(resp.Body).Decode(&result)
      fmt.Println(result)
  }
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://api.tokenlab.sh/v1/pricing?provider=openai&tag=chat');

  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);
  print_r($data);
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "object": "pricing",
    "updated_at": "2026-04-20T00:00:00.000Z",
    "currency": "USD",
    "data": [
      {
        "model": "gpt-4o",
        "provider": "openai",
        "is_lock_price": false,
        "capabilities": ["chat"],
        "aliases": ["gpt-4o-latest"],
        "pricing": {
          "input_per_1m": "2.50",
          "output_per_1m": "10.00",
          "per_request": null,
          "is_lock_price": false,
          "currency": "USD"
        }
      }
    ]
  }
  ```
</ResponseExample>

<Note>
  正確なレスポンス schema は上記のインタラクティブ OpenAPI パネルで確認してください。公開料金エントリには `lock_price_per_request`、`has_complex_pricing`、`supported_operations`、`pricing_summary`、`pricing_provenance` も含まれる場合があります。
</Note>
