メインコンテンツへスキップ
GET
/
subscriptions
/
current
curl -X GET https://api.llmgenerator.com/api/v1/subscriptions/current \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "hasSubscription": true,
  "subscription": {
    "plan": "professional",
    "status": "active",
    "billingCycle": "monthly",
    "currentPeriodStart": "2024-01-15T00:00:00Z",
    "currentPeriodEnd": "2024-02-15T00:00:00Z",
    "cancelAtPeriodEnd": false
  },
  "planDetails": {
    "id": "professional",
    "name": "Professional",
    "monthlyCredits": 3000,
    "price": 12.99,
    "features": [
      "3,000 credits/month",
      "Priority support",
      "Advanced analytics"
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.llmgenerator.com/llms.txt

Use this file to discover all available pages before exploring further.

概要

プラン内容、請求サイクル、更新日など、現在の契約情報を返します。セッション認証(JWT アクセストークン)が必要です。
サードパーティ連携: API キー認証で GET /subscriptions/current/api を利用してください。

認証

Authorization
string
必須
JWT アクセストークン。形式: Bearer YOUR_ACCESS_TOKEN
curl -X GET https://api.llmgenerator.com/api/v1/subscriptions/current \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "hasSubscription": true,
  "subscription": {
    "plan": "professional",
    "status": "active",
    "billingCycle": "monthly",
    "currentPeriodStart": "2024-01-15T00:00:00Z",
    "currentPeriodEnd": "2024-02-15T00:00:00Z",
    "cancelAtPeriodEnd": false
  },
  "planDetails": {
    "id": "professional",
    "name": "Professional",
    "monthlyCredits": 3000,
    "price": 12.99,
    "features": [
      "3,000 credits/month",
      "Priority support",
      "Advanced analytics"
    ]
  }
}

レスポンスフィールド

hasSubscription
boolean
ユーザーに有効な契約があるかどうか。
subscription
object
契約詳細(契約がない場合は null)。
planDetails
object
プランの全体情報(契約がない場合は null)。

契約ステータス

ステータス説明
active契約が有効で正常です
trialing無料試用期中です
past_due支払い失敗があり、まもなく停止する可能性があります
canceled契約は完全に解約されています

エラーレスポンス

401
error
未認証 — トークンが無効または未指定です。

GET /subscriptions/current/api

API キー認証で現在の契約情報を返します。サードパーティ連携向けです。

認証

API キー認証が必要です。Authorization ヘッダーに API キーを付与します。
Authorization: Bearer llmgen_your_api_key_here

レスポンス

/subscriptions/current と同一です。
curl -X GET https://api.llmgenerator.com/api/v1/subscriptions/current/api \
  -H "Authorization: Bearer llmgen_your_api_key_here"