curl --request POST \
--url https://api.aihubmax.com/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "phota-image",
"prompt": "A portrait of a woman in a vintage library, soft natural light",
"num_outputs": 1,
"resolution": "1K",
"aspect_ratio": "3:4"
}
'{
"created": 1757165031,
"id": "task-unified-1757165031-uyujaw3d",
"model": "<string>",
"object": "image.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "image"
}{
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error"
}
}{
"error": {
"message": "Insufficient balance",
"type": "insufficient_quota"
}
}{
"error": {
"message": "Parameter validation failed",
"type": "validation_error"
}
}{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "Internal server error",
"type": "server_error"
}
}{
"error": {
"message": "Service temporarily unavailable, please try again later",
"type": "service_unavailable"
}
}Phota
Phota Image Generation
- PHOTA text-to-image model
- Supports 1K / 4K resolution, can reference profile via
[[profile_id]]in prompt - Asynchronous processing mode, use the returned task ID to query task status
- Generated image links are valid for 24 hours, please save them promptly
POST
/
v1
/
images
/
generations
curl --request POST \
--url https://api.aihubmax.com/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "phota-image",
"prompt": "A portrait of a woman in a vintage library, soft natural light",
"num_outputs": 1,
"resolution": "1K",
"aspect_ratio": "3:4"
}
'{
"created": 1757165031,
"id": "task-unified-1757165031-uyujaw3d",
"model": "<string>",
"object": "image.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "image"
}{
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error"
}
}{
"error": {
"message": "Insufficient balance",
"type": "insufficient_quota"
}
}{
"error": {
"message": "Parameter validation failed",
"type": "validation_error"
}
}{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "Internal server error",
"type": "server_error"
}
}{
"error": {
"message": "Service temporarily unavailable, please try again later",
"type": "service_unavailable"
}
}Authorizations
All APIs require Bearer Token authentication
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
application/json
phota-image: Text-to-image, supports profile reference
Example:
"phota-image"
Image generation prompt
Notes:
- Describe the image content you want to generate
- Supports
[[profile_id]]syntax to reference created profiles
Example:
"A portrait of a woman in a vintage library, soft natural light"
Number of output images
Notes:
- Each image is billed independently
Example:
1
Output image resolution
Options:
1K— Standard resolution4K— High resolution (double price)
Example:
"1K"
Output image aspect ratio
Options:
1:1,2:3,3:2,3:4,4:3,9:16,16:9
Example:
"1:1"
Response
Task created successfully
Task creation timestamp
Example:
1757165031
Task ID
Example:
"task-unified-1757165031-uyujaw3d"
Actual model name used
Specific task type
Available options:
image.generation.task Task progress percentage (0-100)
Required range:
0 <= x <= 100Example:
0
Task status
Available options:
pending, processing, completed, failed Example:
"pending"
Async task information
Show child attributes
Show child attributes
Task output type
Available options:
image Example:
"image"