Introduction
The Mynth HTTP API. Base URL, authentication, response shapes, and every endpoint, generated from the OpenAPI document.
Every endpoint lives under https://api.mynth.io. It speaks JSON, except
POST /image/upload, which takes multipart form data. It authenticates with a
bearer token. No SDK is required.
The endpoint pages are generated from the API's OpenAPI document, so every parameter they list is one the API validates. The document itself is at api.mynth.io/openapi.json.
curl https://api.mynth.io/image/generate \
-H "Authorization: Bearer $MYNTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"black-forest-labs/flux.2-pro","prompt":"A lighthouse at dusk"}'data, errors in error. An error is
{ "error": { "code", "message" } }, with a lowercase snake_case code.
See errors.snake_case, in requests, responses, and webhook
events."0.03". Parse it with a
decimal type, not a float.tsk_ tasks, img_ images, vid_ videos, ak_ API
keys, wbh_ webhooks, dst_ destinations.400 validation_error, which
names each one, so a typo never runs as a silently ignored setting.curl https://api.mynth.io/tasks \
-H "Authorization: Bearer $MYNTH_API_KEY"An API key belongs on a server. A public access token comes with a task
that asked for one with generate_public_access_token: true, expires after an hour, and can only read that task's status and result, which
is why it is safe in browser code. Authentication
has the rules for both, and the scope each endpoint needs.