Skip to main content

Environment variables

Set these in your server environment or .env file:
MYNTH_API_KEY=mak_...
MYNTH_WEBHOOK_SECRET=whsec_...
MYNTH_API_KEY authenticates API requests. MYNTH_WEBHOOK_SECRET is used to verify incoming webhook payloads.

API base URL

Production API base URL:
https://api.mynth.io
The SDK lets you override the base URL if you are proxying locally.

Local webhook testing

During development you can expose a local endpoint and receive callbacks:
  1. Start your local server with a /webhooks/mynth route.
  2. Use a tunneling service to get a public URL.
  3. Add that URL as a custom webhook when you create a task.
When you receive a webhook, verify the signature using the headers documented in the Webhooks page.
1

Create a test key

Create a key in the dashboard and set a spending limit to keep usage predictable.
2

Integrate the SDK

Add the SDK, generate a test image, and inspect the task response for IDs and metadata.
3

Add webhooks

Register your webhook endpoint and handle task.image.completed events.