curl -X GET https://api.llmgenerator.com/api/v1/subscriptions/current \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.llmgenerator.com/api/v1/subscriptions/current', {
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
import requests
response = requests.get(
'https://api.llmgenerator.com/api/v1/subscriptions/current',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)
data = response.json()
{
"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": false,
"subscription": null,
"planDetails": null
}
{
"hasSubscription": true,
"subscription": {
"plan": "professional",
"status": "active",
"billingCycle": "monthly",
"currentPeriodStart": "2024-01-15T00:00:00Z",
"currentPeriodEnd": "2024-02-15T00:00:00Z",
"cancelAtPeriodEnd": true
},
"planDetails": {
"id": "professional",
"name": "Professional",
"monthlyCredits": 3000,
"price": 12.99,
"features": [...]
}
}
구독
현재 구독 조회
인증된 사용자의 현재 구독 상태와 세부 정보를 반환합니다.
GET
/
subscriptions
/
current
curl -X GET https://api.llmgenerator.com/api/v1/subscriptions/current \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.llmgenerator.com/api/v1/subscriptions/current', {
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
import requests
response = requests.get(
'https://api.llmgenerator.com/api/v1/subscriptions/current',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)
data = response.json()
{
"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": false,
"subscription": null,
"planDetails": null
}
{
"hasSubscription": true,
"subscription": {
"plan": "professional",
"status": "active",
"billingCycle": "monthly",
"currentPeriodStart": "2024-01-15T00:00:00Z",
"currentPeriodEnd": "2024-02-15T00:00:00Z",
"cancelAtPeriodEnd": true
},
"planDetails": {
"id": "professional",
"name": "Professional",
"monthlyCredits": 3000,
"price": 12.99,
"features": [...]
}
}
개요
플랜, 과금 주기, 갱신일 등 현재 구독 정보를 반환합니다. 세션 기반 인증(JWT 액세스 토큰)이 필요합니다.서드파티 연동: API 키 인증을 사용할 때는 대신
GET /subscriptions/current/api를 사용하세요.인증
string
필수
JWT 액세스 토큰입니다. 형식:
Bearer YOUR_ACCESS_TOKENcurl -X GET https://api.llmgenerator.com/api/v1/subscriptions/current \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.llmgenerator.com/api/v1/subscriptions/current', {
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
import requests
response = requests.get(
'https://api.llmgenerator.com/api/v1/subscriptions/current',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)
data = response.json()
{
"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": false,
"subscription": null,
"planDetails": null
}
{
"hasSubscription": true,
"subscription": {
"plan": "professional",
"status": "active",
"billingCycle": "monthly",
"currentPeriodStart": "2024-01-15T00:00:00Z",
"currentPeriodEnd": "2024-02-15T00:00:00Z",
"cancelAtPeriodEnd": true
},
"planDetails": {
"id": "professional",
"name": "Professional",
"monthlyCredits": 3000,
"price": 12.99,
"features": [...]
}
}
응답 필드
boolean
활성 구독 존재 여부입니다.
object
object
전체 플랜 정보입니다(구독이 없으면 null).
구독 상태
| 상태 | 설명 |
|---|---|
active | 구독이 정상적으로 유효합니다 |
trialing | 체험 기간입니다 |
past_due | 결제 실패, 곧 일시중지될 수 있습니다 |
canceled | 구독이 완전히 종료되었습니다 |
오류 응답
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"
const response = await fetch('https://api.llmgenerator.com/api/v1/subscriptions/current/api', {
headers: {
'Authorization': 'Bearer llmgen_your_api_key_here'
}
});
const data = await response.json();
import requests
response = requests.get(
'https://api.llmgenerator.com/api/v1/subscriptions/current/api',
headers={'Authorization': 'Bearer llmgen_your_api_key_here'}
)
data = response.json()
이 페이지가 도움이 되었나요?
⌘I