# Mynth > The unified AI media generation API. Every model, every tool — one payload, no infrastructure. Every docs page is also available as plain markdown: append `.md` to its URL, or request it with an `Accept: text/markdown` header. ## Docs — Start here - [Introduction](https://mynth.io/docs.md): Mynth is one HTTP API in front of many image and video models. - [Getting started](https://mynth.io/docs/getting-started.md): Create an API key and generate a first image with the TypeScript SDK, the REST API, or the CLI. - [Authentication](https://mynth.io/docs/authentication.md): Create and rotate mak_ API keys, give each one the scopes it needs, cap its spending, and let a browser poll with a pat_ token. - [Pricing and billing](https://mynth.io/docs/pricing.md): How a price is computed, how to read it before you send, and how the prepaid balance holds and charges each task. ## Docs — Concepts - [Tasks](https://mynth.io/docs/concepts/tasks.md): Every generation and analysis call creates a task. - [Prompts and images](https://mynth.io/docs/concepts/prompts.md): Mynth does not moderate or train on your prompts and images. - [Destinations](https://mynth.io/docs/concepts/destinations.md): Have Mynth write finished images into your own S3, R2 or Bunny storage and return a URL on your domain. - [Webhooks](https://mynth.io/docs/concepts/webhooks.md): Receive a signed POST when a task settles instead of polling. - [Rate limits](https://mynth.io/docs/concepts/rate-limits.md): The 429 you can hit is a key's spending limit. ## Docs — Models - [The model field](https://mynth.io/docs/models.md): What the model field accepts, where to read a model's modes, input rules and price, why to pass an explicit id instead of auto, and what happens when a model cannot serve a field. - [Choosing an image model](https://mynth.io/docs/models/choosing.md): Pick an image model id from the catalog. - [Video models](https://mynth.io/docs/models/video.md): The video models, the resolutions, durations and frame inputs each one accepts, and why video always needs an explicit model id. ## Docs — Guides · Generate - [Generate images](https://mynth.io/docs/guides/generate-images.md): The image generation request, every field it takes, the sizes you can ask for, and what comes back. - [Generate video](https://mynth.io/docs/guides/generate-video.md): Start a video render on an explicit model, with optional frame inputs, and collect the file. - [Image to image](https://mynth.io/docs/guides/image-to-image.md): Send input images with a generation to edit or reference them. - [Enhance prompts](https://mynth.io/docs/guides/enhance-prompts.md): Set magic_prompt to have Mynth rewrite the prompt for the chosen model before it runs, and read back the text that ran. ## Docs — Guides · Edit and analyze - [Remove background](https://mynth.io/docs/guides/remove-background.md): Turn one image into a cutout with a transparent background. - [Alt text](https://mynth.io/docs/guides/alt-text.md): Generate an alt text string, 1 to 160 characters, for an existing image. - [Review images](https://mynth.io/docs/guides/review-images.md): Score an image from 1 to 4 and list what is wrong with it, using a panel of reviewers. - [Rate images](https://mynth.io/docs/guides/rate-images.md): Classify an image as sfw or nsfw, or against rating levels you define, on its own or as part of a generation. ## Docs — Guides · Production - [Estimate cost](https://mynth.io/docs/guides/estimate-cost.md): Price an image or video request before creating it. - [Poll for results](https://mynth.io/docs/guides/poll-for-results.md): Poll a task's status until it settles, then read the result, from a server with an API key or from a browser with the task's pat_ token. ## API reference — Basics - [Introduction](https://mynth.io/docs/api-reference.md): The Mynth HTTP API. - [Authentication](https://mynth.io/docs/api-reference/authentication.md): The Authorization header, the three credential types, the scope each endpoint needs, public access token rules, CORS, and authentication errors. - [The task object](https://mynth.io/docs/api-reference/task-object.md): Every field of a task, the result shape for each task type, and what the create, list, status, and result endpoints return. - [Webhook payloads](https://mynth.io/docs/api-reference/webhook-payloads.md): The HTTP request Mynth sends when a task settles. - [Errors](https://mynth.io/docs/api-reference/errors.md): The shapes an error takes, every request error code and task failure code, how a failed task differs from a rejected request, and what is safe to retry. ## API reference — Endpoints · Image - [Generate image](https://mynth.io/docs/api-reference/endpoints/image/generate.md): Queues an image generation and returns the task straight away — generation itself is asynchronous. - [Estimate cost](https://mynth.io/docs/api-reference/endpoints/image/estimate.md): Prices a request without running it. - [Upload images](https://mynth.io/docs/api-reference/endpoints/image/upload.md): Hosts your own images so they can be referenced as `inputs` by an edit, review or rating task. - [Generate alt text](https://mynth.io/docs/api-reference/endpoints/image/alt.md): Queues a description of an image, written to be read aloud. - [Review image](https://mynth.io/docs/api-reference/endpoints/image/review.md): Queues a judgement of an image against what was asked for — whether it holds up, and where it does not. - [Rate image](https://mynth.io/docs/api-reference/endpoints/image/rate.md): Queues a content rating for an image and returns the task. - [Remove background](https://mynth.io/docs/api-reference/endpoints/image/remove-background.md): Queues a cutout of the subject and returns the task. ## API reference — Endpoints · Video - [Generate video](https://mynth.io/docs/api-reference/endpoints/video/generate.md): Queues a video generation and returns the task straight away. - [Estimate cost](https://mynth.io/docs/api-reference/endpoints/video/estimate.md): Prices a video request without running it. ## API reference — Endpoints · Tasks - [List tasks](https://mynth.io/docs/api-reference/endpoints/tasks/list.md): Your tasks, newest first, in pages. - [Get task](https://mynth.io/docs/api-reference/endpoints/tasks/get.md): One task in full: what was asked for, what came back, what it cost. - [Get task status](https://mynth.io/docs/api-reference/endpoints/tasks/status.md): The status and nothing else — the endpoint to poll on an interval. - [Get task result](https://mynth.io/docs/api-reference/endpoints/tasks/result.md): What the task produced, once it is finished. ## API reference — Endpoints · Models - [List models](https://mynth.io/docs/api-reference/endpoints/models/list.md): Every model you can name in a `model` field, with what it accepts and what it costs. ## API reference — Endpoints · Destinations - [Create destination](https://mynth.io/docs/api-reference/endpoints/destinations/create.md): Registers a bucket Mynth can deliver finished media to. - [List destinations](https://mynth.io/docs/api-reference/endpoints/destinations/list.md): Every destination on the account, without its secrets. - [Get destination](https://mynth.io/docs/api-reference/endpoints/destinations/get.md): One destination and its path configuration, without its secret. - [Update destination](https://mynth.io/docs/api-reference/endpoints/destinations/update.md): Replaces the destination's configuration. - [Delete destination](https://mynth.io/docs/api-reference/endpoints/destinations/delete.md): Removes the destination and its stored credentials. - [Test destination](https://mynth.io/docs/api-reference/endpoints/destinations/test.md): Uploads a small probe object to the given path with the stored credentials, so a misconfigured bucket is found here rather than on a real task. ## API reference — Endpoints · Webhooks - [Create webhook](https://mynth.io/docs/api-reference/endpoints/webhooks/create.md): Registers a URL that receives task events as they happen, so you do not have to poll. - [Update webhook](https://mynth.io/docs/api-reference/endpoints/webhooks/update.md): Replaces the webhook's URL, event subscription and key scoping. - [Delete webhook](https://mynth.io/docs/api-reference/endpoints/webhooks/delete.md): Stops delivery for good. ## API reference — Endpoints · API keys - [Create API key](https://mynth.io/docs/api-reference/endpoints/api-keys/create.md): Mints a key and returns it in full, once. - [List API keys](https://mynth.io/docs/api-reference/endpoints/api-keys/list.md): Every key on the account, with its scopes and spending limit. - [Update API key](https://mynth.io/docs/api-reference/endpoints/api-keys/update.md): Replaces the key's name, scopes and spending limit. - [Delete API key](https://mynth.io/docs/api-reference/endpoints/api-keys/delete.md): Revokes the key immediately. ## API reference — Endpoints · Account - [Get account](https://mynth.io/docs/api-reference/endpoints/account/get.md): Who the credential in the request belongs to, and — for an API key — which scopes it holds and how much of its spending limit is left. - [Get balance](https://mynth.io/docs/api-reference/endpoints/account/balance.md): What is left to spend. ## API reference — Endpoints · System - [Check health](https://mynth.io/docs/api-reference/endpoints/system/health.md): Returns 200 while the API is accepting traffic. ## SDKs & tools — TypeScript SDK - [Overview](https://mynth.io/docs/sdks/typescript.md): @mynthio/sdk is the TypeScript client for Mynth. - [Installation](https://mynth.io/docs/sdks/typescript/installation.md): Install @mynthio/sdk, set MYNTH_API_KEY, and import from the right entry point. - [Client](https://mynth.io/docs/sdks/typescript/client.md): The Mynth constructor options, where the key, base URL, and default destination come from, and the image, video, and models clients. - [Generating media](https://mynth.io/docs/sdks/typescript/generating-media.md): Generate images and video with the TypeScript client, run the image tools, upload local files, and read the result classes. - [Tasks and polling](https://mynth.io/docs/sdks/typescript/tasks.md): Wait with generate(), return early with generateAsync(), how long the SDK polls, and how to hand a browser the pat_ token. - [Errors](https://mynth.io/docs/sdks/typescript/errors.md): MynthAPIError for a rejected request, the TaskAsync errors a wait can throw, and how to read the codes of a task that failed. ## SDKs & tools — CLI - [Overview](https://mynth.io/docs/sdks/cli.md): Install the Mynth CLI, log in with a browser approval, and generate images, manage keys, webhooks and destinations, and read these docs from the terminal. - [Logging in](https://mynth.io/docs/sdks/cli/logging-in.md): Approve a one-time code in the browser. - [Commands](https://mynth.io/docs/sdks/cli/commands.md): Every Mynth CLI command and its main flags, with exit codes and environment variables. ## SDKs & tools — Integrations - [Convex](https://mynth.io/docs/sdks/integrations/convex.md): Start a generation from a Convex action and receive the signed webhook on a Convex HTTP route with mynthWebhookAction. - [TanStack Start](https://mynth.io/docs/sdks/integrations/tanstack-start.md): Receive signed Mynth webhooks in a TanStack Start server route, generate from a server function, and use the TanStack AI image adapter. ## SDKs & tools — Agents - [llms.txt](https://mynth.io/docs/sdks/agents/llms-txt.md): Read these docs as plain markdown, one page, the index, or every page in one file, over HTTP or with the CLI. - [Skills](https://mynth.io/docs/sdks/agents/skills.md): The Mynth agent skill, a SKILL.md with task-specific references, from the oss repository. - [Agent prompt](https://mynth.io/docs/sdks/agents/agent-prompt.md): A prompt to paste into a coding agent before it integrates Mynth, and the rules it should follow. ## Optional - [Changelog](https://mynth.io/changelog.md): updates across the API, SDK, CLI, and packages, newest first and paged (JSON: https://mynth.io/changelog.json). Filter with `q`, `product`, `type`, `breaking=true`, `page` and `limit`: https://mynth.io/changelog.md?product=sdk&breaking=true - [Model catalog](https://mynth.io/models.txt): every available model with pricing and capabilities - [Pricing](https://mynth.io/pricing.md): every price in one sheet — tools, image and video models, billing (JSON: https://mynth.io/pricing.json) - [OpenAPI spec](https://api.mynth.io/openapi.json): the full API surface