コンテンツへスキップ
APIリファレンス
APIリファレンス

APIキーの一覧取得

現在のアカウントのアクティブな標準APIキーの一覧を取得します。

現在のアカウントのアクティブな標準APIキーの一覧を取得します。

エンドポイント

GET /api/v1/keys
ベースURL
https://runapi.ai
API バージョン
v1
認証
Authorization: Bearer YOUR_MANAGEMENT_API_KEY
Authorization
アカウント管理者の Management API キーが必要で、そのユーザーが所有する標準 API キーのみ返します。
02

リクエスト

JSONボディ

指定されたリクエストの場所にのみ値を送信してください。

クエリパラメータフィールド2件
limitinteger
任意

1ページあたりに返されるAPIキーの最大数。

デフォルト: 20 範囲: 1 - 100
pageinteger
任意

オフセットページ番号。値は1から始まります。

デフォルト: 1 範囲(固定): 1
03

成功レスポンス

HTTP 200

GET /api/v1/keys

JSON
{
  "keys": [
    {
      "allowed_models": [
        "gpt-5.4"
      ],
      "created_at": "2026-07-27T10:00:00.000Z",
      "credit_limit_cents": 1000,
      "credit_limit_reset_interval": "daily",
      "credit_limit_windows": {
        "1d": {
          "limit_cents": 500
        },
        "1h": {
          "limit_cents": 100
        },
        "7d": {
          "limit_cents": 2000
        }
      },
      "enabled": true,
      "guardrail_id": "guardrail_123",
      "id": "token_123",
      "last_used_at": null,
      "masked_token": "runapi_abc...wxyz",
      "name": "Production"
    }
  ],
  "pagination": {
    "limit": 20,
    "page": 1,
    "pages": 1,
    "total": 1
  }
}
04

エラーレスポンス (401)

HTTP 401
レスポンススキーマ
JSON
{
  "properties": {
    "error": {
      "description": "人が読めるエラーメッセージ。",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

レスポンス例

JSON
{
  "error": "Authentication required"
}
05

エラーレスポンス (403)

HTTP 403
レスポンススキーマ
JSON
{
  "properties": {
    "error": {
      "description": "人が読めるエラーメッセージ。",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

レスポンス例

JSON
{
  "error": "Management API key required"
}
06

エラーレスポンス (403)

HTTP 403
レスポンススキーマ
JSON
{
  "properties": {
    "error": {
      "description": "人が読めるエラーメッセージ。",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

レスポンス例

JSON
{
  "error": "Account admin required"
}
07

エラーレスポンス (400)

HTTP 400
レスポンススキーマ
JSON
{
  "oneOf": [
    {
      "properties": {
        "error": {
          "description": "人が読めるエラーメッセージ。",
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    {
      "properties": {
        "error": {
          "description": "人間が読める形式のバリデーションサマリー。",
          "type": "string"
        },
        "errors": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "公開リクエストフィールドをキーとするバリデーションメッセージ。各フィールドに対して人間が読める文字列の配列が含まれます。",
          "type": "object"
        }
      },
      "required": [
        "error",
        "errors"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  ]
}

レスポンス例

JSON
{
  "error": "page must be an integer"
}
08

cURLの例

CURL
curl -X GET https://runapi.ai/api/v1/keys?page=1&limit=20 \
  -H 'Authorization: Bearer YOUR_MANAGEMENT_API_KEY'