auto stud
APIAI Image Generation API

Generate images
and finish them in the same call chain

One POST runs an image agent - GPT Image, Imagen, Nano Banana, Grok or Leonardo - and the steps that usually come next, cutting out, editing and reframing, are one call away on the same key.

POSThttps://autostud.ai/api/v1/actions/images.generate

Three calls, prompt to finished asset

Pick the engine once, generate as often as you like, then finish the file.

  1. 1

    Choose an image agent

    An agent is a saved configuration: engine, size, style, and the prompt template your team agreed on. List the ones your workspace has and keep the id.

    export AUTOSTUD_API_KEY="sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    
    # An image agent is a saved configuration, not a model name.
    curl "https://autostud.ai/api/v1/agents?agent_type=image&limit=10" \
      -H "Authorization: Bearer $AUTOSTUD_API_KEY"
  2. 2

    Generate

    Send the prompt, plus any variables the template expects. The response carries the image and the credits it spent.

    curl -X POST https://autostud.ai/api/v1/actions/images.generate \
      -H "Authorization: Bearer $AUTOSTUD_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: sku-4471-packshot" \
      -d '{
        "agent_id": "a91d5f27-6c0b-4e83-97aa-2b1e4d70c6f9",
        "prompt": "A ceramic mug seen three-quarter, soft studio light",
        "variables": {
          "product": "ceramic mug",
          "color": "matte navy"
        }
      }'
  3. 3

    Finish the file

    Cut the background out, apply an instruction-based edit, or reframe it to another format. Same key, same ledger, no second integration.

    curl -X POST https://autostud.ai/api/v1/actions/tools.remove_background \
      -H "Authorization: Bearer $AUTOSTUD_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "image_url": "https://cdn.autostud.ai/generations/b6c30a19.../image.png"
      }'

What you can pass

Three fields to generate, one to post-process.

agent_id

The image agent to run. Its engine, size and style come with it.

prompt

What to draw, written the way your agent template expects it.

variables

Values for the placeholders in that template, so one agent can serve a whole catalog.

image_url

For the finishing tools: the image to cut out, edit or crop. Anything publicly reachable.

Engines behind the endpoint

Each engine is exposed as an agent, so switching model is a different id, not a different integration. New engines appear as new agents.

GPT ImageImagenNano BananaGrokLeonardo

The tools that come after

Generation is rarely the last step. Background removal, instruction edits and reframing are actions on the same API, billed the same way and scoped by the same key.

tools.remove_backgroundtools.image_modificationtools.image_crop

Questions developers ask first

How do I know what an image cost?

Every response reports the credits it spent, and the history stays readable at /api/v1/generations. Prices are per engine and set in the workspace, never in the request.

Can one agent serve many prompts?

That is what variables are for: the agent holds the template and the style, the call fills in what changes. A product catalog is one agent and N calls, not N agents.

Are images delivered by webhook too?

generation.completed fires for images exactly as it does for video and audio, so a single subscription covers the whole generation family.

Can I use a generated image in a video?

Yes. The generated URL drops straight into a timeline layer, and renders.create turns the whole composition into an mp4 on the same key.

Ready to create?

Start generating viral videos in minutes. No credit card required for the free trial.

Secure payments
Instant access
Cancel anytime