API Introduction
CharaStudio provides a complete REST API allowing developers to:
- Remotely create and edit characters
- Generate story content
- Manage asset libraries
- Generate comic images
The API is based on standard REST conventions, using JSON as the data interchange format.
Base URL
https://api.charastudio.com/v1
Authentication
CharaStudio API uses Bearer Token authentication:
Authorization: Bearer YOUR_API_KEY
You can obtain an API Key on the CharaStudio Settings page.
Request Format
All requests should include the following headers:
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
Accept: application/json
Response Format
Standard success response format:
{
"success": true,
"data": { ... },
"meta": {
"request_id": "req_abc123",
"processing_time_ms": 1523
}
}
Error response:
{
"success": false,
"error": {
"code": "INVALID_PARAMETER",
"message": "The 'name' field is required",
"details": { ... }
}
}
Status Codes
| Code | Meaning |
|---|---|
| 200 | Request successful |
| 201 | Resource created successfully |
| 400 | Parameter error |
| 401 | Authentication failed |
| 403 | Insufficient permissions |
| 404 | Resource not found |
| 429 | Too many requests |
| 500 | Internal server error |
Rate Limits
| Plan | Requests/minute | Tokens/minute |
|---|---|---|
| Free | 20 | 10,000 |
| Pro | 100 | 50,000 |
| Enterprise | 1000 | 500,000 |
When a rate limit is triggered, the response will include the following headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1699999999
Retry-After: 30
SDKs and Client Libraries
Officially supported SDKs:
- Python:
pip install charastudio-sdk - JavaScript/TypeScript:
npm install charastudio-sdk - Java: Coming soon
- Go: Coming soon
Community-contributed libraries are available in the GitHub Community Repository.