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.

Agent prompt

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.

RuleWhy
The base URL is https://api.mynth.io, with no version prefixAPI reference
Pass an explicit model id from the catalogauto is experimental
Generation returns a task, not a fileTasks
Check status on every item of a completed taskPartial 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 destinationFile lifetimes
Verify webhooks against the raw body, and deduplicate on X-Mynth-DeliveryWebhooks
Do not blindly retry a create. There are no idempotency keysWhat is safe to retry
Read prices from the catalog or an estimate, never from these docsPricing
In TypeScript, use @mynthio/sdk and its webhook helpersTypeScript SDK

Next steps#