API Reference · 사용량 및 청구 API
사용량 및 청구 API
사용량 통계, 청구 정보 조회, 결제 관리.
사용량 통계
GET
$GET https://api.alltoken.ai/api-account/user/usage날짜 범위, 모델, API Key별로 필터링 가능한 Token 사용량 및 비용 내역을 반환합니다.
최근 요청
GET
$GET https://api.alltoken.ai/api-account/user/usage/recent?limit=20&cursor=<opaque>created_at 내림차순으로 요청 단위 호출 이력을 반환합니다. 커서 페이지네이션 (offset 아님, 동시 쓰기 시에도 안정적). 각 항목은 id / created_at / model_id / model_name / api_key_name / total_tokens / cost_str / status (success / failed / refunded)를 포함합니다. 응답: { items, next_cursor, has_more }. 사용량이 없으면 { items: [], has_more: false, next_cursor: "" }를 반환하며 404가 아닙니다.
API 사용량 한도
GET
$GET https://api.alltoken.ai/api-account/user/usage-quotaAPI 호출에 사용할 수 있는 현재 API 사용량 한도를 반환합니다.
API 사용량 구매
POST
$POST https://api.alltoken.ai/api-account/user/billing/create-checkoutBody
| 1 | { |
| 2 | "channel": "stripe", |
| 3 | "inner_id": 1, |
| 4 | "currency": "USD" |
| 5 | } |
API 사용량 패키지 구매를 위한 결제 세션을 생성합니다. 사용자를 리디렉션할 결제 URL을 반환합니다.