Now in Claude: generate images & videos from chat
Connect

AI Media Generation API: Images and Video with One Key

Use one AI media generation API for image, editing, video, motion control, and lip sync models with shared credits, cost previews, and copy-paste examples.

Guide7 min read

An AI media generation API should let you choose the right model without rebuilding authentication, billing, validation, and job polling every time. The MakeInfluencer REST API exposes image generation, image editing, text-to-video, image-to-video, motion control, and lip sync behind one model-aware endpoint.

The commercial idea is deliberately simple: the API, MCP connector, and dashboard spend the same MakeInfluencer credits at the same model prices. There is no second API balance and no per-request markup.

1 API Key
1 Credit Balance
202 Async Jobs
0 Cost to Preview

The Four-Request Workflow

Every model follows the same lifecycle, even when its fields differ.

1

Discover

List models or fetch one model to get its exact fields, defaults, enum options, and input limits.

2

Preview

Send the planned model input to preview-credits. Validation runs, but nothing is charged.

3

Generate

POST the same input to the model generation endpoint. The API returns HTTP 202 and a generation ID.

4

Poll

Poll the owned image or video status endpoint until terminal is true. On success, ready is true and the response includes the output URL.

This contract matters because AI models are not interchangeable. An image editor may need several image URLs. An image-to-video model needs a start frame. InfiniteTalk needs a character image, audio URL, and duration. MakeInfluencer keeps the outer API stable while publishing each model's real inner schema.

Authentication

Create a revocable mi_ key in Dashboard → Developer API → Keys, then send it as a Bearer token.

curl https://www.makeinfluencer.ai/api/v1/account \
  --header "Authorization: Bearer $MAKEINFLUENCER_API_KEY"

Keys are displayed once, stored as hashes, and can be revoked without changing your login. The same key also works for compatible MCP clients.

Keep Keys Server-Side

Never place an API key in browser JavaScript or a public mobile bundle. Call MakeInfluencer from your server, worker, or automation platform and keep the key in its secret store.

Discover AI Image and Video Models

Start with the catalog instead of guessing field names:

curl https://www.makeinfluencer.ai/api/v1/models \
  --header "Authorization: Bearer $MAKEINFLUENCER_API_KEY"

Each model includes:

  • A stable model ID used in the URL
  • Media kind: image or video
  • Category and use cases
  • Accepted fields and field types
  • Required flags, defaults, ranges, and enum options
  • Capabilities such as text-to-video or image-to-video

For a human-readable version, open the developer model directory. It contains a dedicated API page for every live model, including HappyHorse 1, Qwen Image 2 Pro Edit, Seedance 2 Fast, and InfiniteTalk.

Preview Credits Before Spending

Credit preview uses the same registry validation and pricing function as generation. If the input is invalid, fix it before spending anything.

curl --request POST \
  https://www.makeinfluencer.ai/api/v1/models/happyhorse1/preview-credits \
  --header "Authorization: Bearer $MAKEINFLUENCER_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "input": {
      "prompt": "A fashion creator walking through neon Tokyo",
      "aspectRatio": "9:16",
      "duration": 5,
      "resolution": "720p"
    }
  }'

The response contains the model ID and a credit quote with a human-readable description. Previewing does not reserve credits and does not start a generation.

This is useful for products with user budgets. You can show the quote in your UI, reject unexpectedly expensive requests, or estimate a batch before a scheduled run begins.

Create an Image or Video

Use the model ID in the URL and place model-specific fields inside input:

curl --request POST \
  https://www.makeinfluencer.ai/api/v1/models/happyhorse1/generations \
  --header "Authorization: Bearer $MAKEINFLUENCER_API_KEY" \
  --header "Idempotency-Key: campaign-video-001" \
  --header "Content-Type: application/json" \
  --data '{
    "input": {
      "prompt": "A fashion creator walking through neon Tokyo",
      "aspectRatio": "9:16",
      "duration": 5,
      "resolution": "720p"
    }
  }'

A successful request returns HTTP 202:

{
  "status": "queued",
  "kind": "video",
  "modelId": "happyhorse1",
  "ids": ["GENERATION_ID"]
}

The accepted response also carries a creditsCost field holding the exact amount charged for that input. Credit costs move whenever provider pricing moves, so read the live number from the model's API page or from the preview-credits endpoint rather than hard-coding one.

The Idempotency-Key protects paid operations when a network timeout makes the result uncertain. Repeating the same key and payload replays the first response. Reusing the key with different input returns a conflict instead of charging for an accidental second job.

Poll the Result

Use the kind and first generation ID returned by the create call:

curl https://www.makeinfluencer.ai/api/v1/generations/video/GENERATION_ID \
  --header "Authorization: Bearer $MAKEINFLUENCER_API_KEY"

Video status responses expose one url; image responses expose urls because image requests may create several copies. Status lookups are ownership-scoped, so one account cannot inspect another account's generation by guessing an ID.

Do not poll in a tight loop. A backoff such as 5, 10, 20, then 30 seconds keeps the workflow responsive without wasting request capacity.

Which API Should You Use?

GoalSuggested API
Create a reusable AI personaAI Influencer Image API
Edit an outfit or backgroundQwen Image 2 Pro Edit API
Generate low-latency campaign imagesZ-Image Turbo API
Animate a creator image quicklySeedance 2 Fast API
Generate cinematic clipsHappyHorse 1 API
Turn portrait plus audio into speechInfiniteTalk API

The best production architecture does not hard-code one provider forever. Store the MakeInfluencer model ID with each workflow template and let the API's model catalog tell your application which controls to show.

REST API vs MCP

REST and MCP are two interfaces over shared generation services.

Feature
REST API
MCP Connector
Best for
Deterministic app and automation workflows
Conversational creation
with an AI agent Authentication
Bearer API key
OAuth in Claude or Bearer key
in other clients Control
Exact endpoint and payload
Tool selection delegated
to the agent Billing
Shared MakeInfluencer credits
Shared MakeInfluencer
credits Model catalog
GET /models
Model-listing tools

Use REST for a product backend, cron job, n8n flow, or queue worker. Use the MCP integration when a person wants Claude, Cursor, or another agent client to request and iterate on media through conversation.

Production Checklist

  • Preview credits before large or user-triggered jobs
  • Add a unique idempotency key to every paid request
  • Store kind, modelId, and returned IDs together
  • Poll with backoff and stop on terminal failure states
  • Treat output URLs as application data, not as the job ID
  • Handle 402 by sending the user to the purchaseUrl from /account
  • Respect Retry-After on 429
  • Revoke keys immediately when a workflow or contractor no longer needs access

Frequently Asked Questions

Does API usage cost more than dashboard usage?

No. REST, MCP, and the dashboard use the same account credit balance and model pricing. The API does not add a separate markup.

Can I know the price before generating?

Yes. Send the exact planned input to the model's preview-credits endpoint. The request validates the input and returns the quote without charging.

Is the API synchronous?

No. Generation returns HTTP 202 so your server does not wait for image or video inference. Poll the owned status endpoint for the result.

Where is the complete API reference?

Use the visual developer documentation, plain-text /developers.md for AI coding agents, or /openapi.json for OpenAPI tooling.

Can I switch models without integrating another provider?

Yes. Change the model ID and send that model's published input schema. Authentication, credits, asynchronous responses, status polling, and error envelopes remain consistent.

Ready to build? Explore the MakeInfluencer AI media API, open the developer quickstart, create a key, and preview the cost of your first request.

Ready to try it yourself?

Start creating AI influencers and generating content in minutes.