Skip to main content
Use prompt, optional negative_prompt, and optional magic_prompt on POST /image/generate (or mynth.image.generate()). prompt is required. Negative and magic prompt are omitted by default. For many independent prompts in parallel, use separate generate calls — see Batch Generation. There is no multi-prompt array field on a single request. For the full request schema, see Image Generation Request.

Pricing

Magic prompt is included with image generation at no extra charge today (image.generate.magic_prompt cost is currently 0). Image generation itself is billed per successful image for the chosen model. See model pricing on mynth.io/models.

Send a positive prompt

prompt is a plain string (maximum 8192 characters):
Omit magic_prompt to send this text to the model as-is.

Discourage content with a negative prompt

Pass negative_prompt as a separate top-level string (maximum 8192 characters):
Whether the provider applies negative_prompt depends on the model. Models that support it list Negative prompt: Yes on their model page and expose the negative_prompt capability in the SDK’s AVAILABLE_MODELS. Models with native negative-prompt support today: On models without that capability, Mynth accepts negative_prompt on the request but does not send it to the provider. Prefer models that document negative-prompt support when exclusions matter.

Rewrite the prompt with magic prompt

Set magic_prompt: true to let Mynth rewrite your prompt before generation. The type accepts only true — omit the field to leave the prompt unchanged (do not send false).
When enabled:
  1. Mynth runs a text model that refines the positive prompt (and can produce or refine a negative when the magic path is configured for negatives).
  2. Generation uses the rewritten text.
  3. The completed task result includes magic_prompt with what was sent downstream.

Read the rewritten prompt

On a completed generate task, when magic prompt ran:
magic_prompt.positive is always present after a successful rewrite. magic_prompt.negative is optional — it appears when the rewrite path returns a negative (for example on models that use magic negative-prompt examples).

Model-tuned magic prompts

Magic prompt works for every model via a general rewrite path. Some models also ship model-tuned overrides (style card, examples, and sometimes negative-prompt guidance). On those model pages, magic prompt is listed as Improved (model-tuned). Models with model-tuned magic prompts today:

REST example

Creating a task does not return images immediately. Wait in the SDK, poll task endpoints, or use webhooks — see Async and polling. When the task completes, result.magic_prompt is present if magic_prompt: true was applied.

How prompts fit generation

  1. You send prompt (required) and optional negative_prompt / magic_prompt: true.
  2. If magic prompt is enabled, Mynth rewrites the prompt for the resolved model.
  3. Mynth generates images with the final positive (and negative when the model supports it).
  4. The task result includes images and, when magic ran, magic_prompt with the rewritten text.
Prompt fields do not change task shape: you still create one image.generate task per request. For many prompts or models at once, fan out with parallel requests — Batch Generation.