Practical limits
Image generation
countmaximum:20- prompt length maximum:
8192characters - negative prompt length maximum:
8192characters inputsmaximum per request:20inputshortcut maximum length:2048characters- custom webhook endpoints per request:
5 destinationname maximum length:64charactersmetadatamaximum size:2 KB
Content rating
- URLs per request maximum:
10 - custom levels minimum:
2 - custom levels maximum:
7 - custom level
valuemax length:24 - custom level
descriptionmax length:150
Alt text
- URLs per request maximum:
10 - alt text maximum length:
160characters
Uploads
- maximum files per request:
10 - maximum file size:
10 MB - minimum file size:
1 KB - maximum request body size:
100 MB - accepted formats: JPEG, PNG, WEBP
Concurrency
Mynth does not enforce API concurrency limits. If you want to create many independent tasks, you can send requests in parallel.Error response shape
Every API error returns a JSON body with a machine-readablecode and a human-readable message:
SCREAMING_SNAKE_CASE. message is informational and may change; do not parse it.
Common failure cases
Unauthorized
HTTP401 with code: "UNAUTHORIZED".
You used:
- a missing or invalid API key
- a Public Access Token on an owner-only endpoint
- a task token for the wrong task
Validation errors
HTTP400 with code: "VALIDATION_ERROR".
The request shape does not match what Mynth expects, or the selected model does not support a requested capability such as input images.
Insufficient balance
HTTP422 with code: "INSUFFICIENT_BALANCE".
Task creation reserves cost before generation begins. Requests fail when the account does not have enough available balance.
Spending limit exceeded
HTTP429 with code: "SPENDING_LIMIT_EXCEEDED".
The reserved cost would push the API key’s spending limit past its configured cap for the current period. See Authentication.
Upload too large
HTTP413 with code: "VALIDATION_ERROR".
The upload request body exceeds the maximum size.
Not found
HTTP404 with code: "TASK_NOT_FOUND".
The task ID does not exist, or you do not have access to it.
Task failed
The task was accepted but did not complete successfully. This is not an HTTP error. Polling will eventually returnstatus: "failed", and webhook delivery will emit task.image.generate.failed.
SDK-specific errors
The JavaScript SDK can also throw:MynthAPIError- wraps all API errors with the HTTPstatusand the errorcodeTaskAsyncTimeoutError-wait()polled for five minutes without completionTaskAsyncUnauthorizedError- the Public Access Token was rejectedTaskAsyncFetchError- a network fetch failed during pollingTaskAsyncTaskFetchError- the task detail fetch failedTaskAsyncTaskFailedError- the task completed withstatus: "failed"
MynthAPIError to inspect the underlying API error: