Overview
The AudioPod AI Credits API allows you to monitor your credit balance, track usage history, and purchase additional credits through our pay-as-you-go system. Credits are used to access all AudioPod AI services including Text to Speech, transcription, and music creation.Key Features
- Real-time Balance: Check current credit balance and usage
- Usage Tracking: Detailed history of credit consumption by service
- Pay-as-You-Go: Purchase credits as needed without subscriptions
- Multiple Sources: Track subscription credits and PAYG credits separately
- Cost Transparency: Clear credit costs for each service
Authentication
The Credits API supports two authentication methods:JWT Token Authentication (Recommended)
- Header:
Authorization: Bearer your_jwt_token - Obtain via:
/api/v1/auth/tokenendpoint with email/password - Best for: Web applications, temporary access
API Key Authentication
- Header:
Authorization: Bearer your_api_key - Obtain via: API Keys dashboard in your account
- Best for: Server-to-server integration, production applications
For detailed API key management, see the API Key Management guide.
Get Credit Balance
Current Credit Information
Get current credit balance and account information.- Python
- Node.js
- Raw HTTP
- cURL
Credit Usage History
Get Usage Logs
Retrieve detailed history of credit usage across all services.- GET
- Python
Service Credit Costs
Get Credit Multipliers
Get current credit costs for different services and features.- GET
- Python
Pay-as-You-Go Credits
Get PAYG Information
Get information about pay-as-you-go credit purchasing options.- GET
- Python
Create PAYG Checkout Session
Create a checkout session for purchasing pay-as-you-go credits.- POST
- Python
- cURL
Usage Analytics
Track Credit Consumption
Monitor credit usage patterns and optimize costs.- Python
Integration Examples
Real-time Balance Monitoring
Cost Estimation
Error Handling
402 Payment Required - Insufficient Credits
402 Payment Required - Insufficient Credits
Causes: - Not enough credits for requested service - Credit balance is zero
Solutions: - Purchase additional PAYG credits - Check credit balance before requests -
Upgrade to higher credit plan
400 Bad Request - Invalid Amount
400 Bad Request - Invalid Amount
Causes: - PAYG amount below minimum (1000)
Solutions: - Use amount between 1000 - Check PAYG info endpoint for current limits
404 Not Found - No Usage Data
404 Not Found - No Usage Data
Causes: - No credit usage history - User account newly created
Solutions: - Use some services to generate usage history - Check after making API calls
