Agent prompt
A prompt to paste into a coding agent before it integrates Mynth, and the rules it should follow.
Paste this into your coding agent before it writes an integration. It tells the agent to read these docs first, ask before it touches credentials, pass an explicit model, and not invent endpoints.
Integrate Mynth into this project. Before you write code, run npx @mynthio/cli docs list and
npx @mynthio/cli docs get getting-started, and read the page for each call you are about to
make. Docs need no account. Follow the docs exactly: no /v1 prefix, no invented endpoints or
fields, no model aliases. Pass an explicit model id such as black-forest-labs/flux.2-pro, never
auto. Keep the API key on the server. Check the status of every image in a completed task.
Before you create or store a credential, ask me which I want: I set MYNTH_API_KEY myself, or
you run npx @mynthio/cli auth login and npx @mynthio/cli api-key create <name> after I
approve the login.
Rules for agents#
These are the mistakes agents make most often with Mynth. Each links to the page that explains it.
| Rule | Why |
|---|---|
The base URL is https://api.mynth.io, with no version prefix | API reference |
| Pass an explicit model id from the catalog | auto is experimental |
| Generation returns a task, not a file | Tasks |
Check status on every item of a completed task | Partial failure |
Never send the mak_ key to a browser. Browsers poll with the pat_ | Authentication |
| Copy files you need for more than 7 days, or use a destination | File lifetimes |
Verify webhooks against the raw body, and deduplicate on X-Mynth-Delivery | Webhooks |
| Do not blindly retry a create. There are no idempotency keys | What is safe to retry |
| Read prices from the catalog or an estimate, never from these docs | Pricing |
In TypeScript, use @mynthio/sdk and its webhook helpers | TypeScript SDK |
Next steps#
- llms.txt: every way to read these docs as markdown.
- Skills: the Mynth skill for coding agents.
- Getting started: a key and a first image.