Base URL
https://firemoon.studio/api
Most API requests require authentication using an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Some endpoints like /api/models and /api/models-config/* are public and don’t require authentication.
Endpoints
Generation Endpoints
| Method | Endpoint | Description | Auth Required |
POST | /api/v1/{modelid} | Generate content using a specific model | Yes |
Account & Usage Endpoints
| Method | Endpoint | Description | Auth Required |
GET | /api/credits/balance | Get your current credit balance | Yes |
GET | /api/generations | Get your generation history | Yes |
GET | /api/usage | Get usage statistics and analytics | Yes |
All generation endpoints return a consistent response structure:
{
"images": [
{
"url": "https://blob.vercel-storage.com/...",
"width": 1024,
"height": 768,
"content_type": "image/jpeg"
}
],
"seed": 123456789,
"has_nsfw_concepts": [false],
"timings": {
"inference": 2.5
}
}
For video generation, the response includes video URLs instead of images:
{
"videos": [
{
"url": "https://blob.vercel-storage.com/...",
"duration": 5,
"width": 1920,
"height": 1088,
"content_type": "video/mp4"
}
],
"seed": 123456789,
"timings": {
"inference": 15.2
}
}
Error Responses
401 Unauthorized
{
"error": "Invalid API key",
"message": "Please provide a valid API key in the Authorization header"
}
403 Forbidden
{
"error": "Access denied",
"message": "Your API key does not have access to provider: flux"
}
404 Not Found
{
"error": "Model not found",
"message": "Model configuration not found for flux/invalid-model"
}
429 Too Many Requests
{
"error": "Rate limit exceeded",
"message": "Rate limit exceeded. Try again in 45 seconds.",
"resetAt": "2025-10-23T10:30:00.000Z"
}
400 Bad Request
{
"error": "Invalid input",
"message": "Input validation failed",
"errors": [
"Missing required field: prompt"
]
}
402 Payment Required
{
"error": "Insufficient credits",
"message": "Insufficient credits to generate content"
}
Common causes:
- Credit balance is too low for the requested operation
- Cost exceeds available balance
500 Internal Server Error
{
"error": "Generation failed",
"message": "Failed to generate image: timeout"
}