Skip to content

Generate an image

POSThttps://api.vidmoat.com/v1/ai/images
Bearer tokenScope ai.image60 credits Grok; OpenAI/Vertex from 128 creditsTry it in the playground

Generate a still with optional referenceUrls (up to 5 images: your uploads or public HTTPS images). provider accepts grok, openai, vertex or auto (default). quoteOnly:true returns the initial and maximum credits without spending. Retain provider:auto with the quoted maxCredits to allow safe quota fallback; explicit providers never switch. OpenAI GPT Image 2.5 Flare costs 128 at 1k or 256 at 2k plus 8 per reference; Vertex costs 128/192 plus 2 per reference. Only the successful asset is charged. Studio.

Body#

  • promptstringrequired
    Up to 800 characters.
  • providerenumdefault auto
    Who generates it.
    One of auto, grok, openai, vertex
  • resolutionenumdefault 2k
    Affects OpenAI and Vertex prices.
    One of 1k, 2k
  • aspectRatiostring
    For example 16:9, 9:16, 1:1, 4:5, 21:9.
  • referenceUrlsarray of strings
    Up to 5 reference images: your upload URLs (png, jpg, webp, avif) or public HTTPS URLs.
  • maxCreditsnumber
    Never spend more than this.
  • quoteOnlyboolean
    true returns the route and price without generating or charging.

Response#

Returns 200.

Response fields#

  • urlstring
    The image. Use as a clip src.
  • routeobject
    The provider route chosen: provider, model, credits, maxCredits, reason and policy (and voiceId for speech).
  • creditsobject
    { charged, remaining }: what this call cost and the balance after it.
  • hintstring
    What to do with it.

Errors#

Besides the errors any request can get (authentication, rate limits):

StatusCodeWhen
400invalid_requestNo prompt, a refused reference, or no provider matches the options and maxCredits.
402plan_requiredThe plan has no image generation.
402insufficient_creditsThe balance cannot cover the call. Nothing ran. remaining is the balance.
422prompt_rejectedThe prompt failed the safety check. Nothing was charged. field names the field.
502provider_errorThe generation provider failed. The charge is refunded.