AIFLUX

AIFLUX

API & integrations

Create with your AI assistant

Connect an MCP client to generate images and videos with your AIFlux account. Results appear in your account, with the same credit prices and generation checks as the website.

1. Connect your account

In an OAuth-compatible MCP client, add https://app.aiflux.dev/mcp and choose Connect. Sign in to AIFlux, review the requested permissions and callback address, then set a daily credit limit. The connection expires after 30 days and can be revoked from your account.

If your client uses custom headers, you can still create an API key:

Open My Account → API & integrations. Give the connection a name and set its daily credit limit.

Copy the key when it appears. AIFlux stores only its hash and cannot show it again. You can revoke it from the same page.

2. Configure your MCP client

Choose a remote Streamable HTTP server with a custom Authorization header:

Server URL
https://app.aiflux.dev/mcp
Header name
Authorization
Header value
Bearer YOUR_AIFLUX_API_KEY

OAuth clients use automatic discovery with dynamic client registration and PKCE. For API keys, replace the placeholder in your client's settings. Never put a key or token in a prompt, a shared document or a URL.

3. Start with discovery

Ask your assistant: “List the available AIFlux image and video models and show my credit balance.” These checks are free.

ToolPurpose
list_image_modelsCreate models, prices and reference limits.
list_video_modelsVideo models, frame inputs, durations and default prices.
get_creditsYour remaining balance.
list_projects / list_lorasFind projects and available personal or project-shared LoRAs by name.
create_upload / get_asset / list_assetsUpload local references privately and reuse them by ID.
get_video_promptGet a detailed generation prompt from a video.
get_maskCreate a video mask: white subject on black background. Free.
get_depthCreate a grayscale depth map from an image or video. Free.
get_subject_dress / get_subject_actionDescribe visible clothing or actions, optionally selecting one subject.
get_camera_motion / get_scene_descriptionAnalyze camera work or the environment and lighting.
quote_image / quote_videoGet the current price before approving a generation.
get_requestRecover an original request without submitting it again.
generate_imageGenerate images, or edit from public HTTPS image references.
generate_videoGenerate a video from text or image inputs.
get_job / wait_for_jobCheck progress and retrieve the finished result.
list_recent_jobsFind recent requests, including unfinished ones.

For example: “Generate one vertical image of a perfume bottle on a marble table with Nano Banana 2, then retrieve the result.”

For video: “Show the default cost of Seedance 2.5, then create a five-second video of ocean waves in 720p and retrieve the result.”

For a mask or depth map, supply a private upload or completed generation asset ID and a unique request_key. Videos support up to 60 seconds and 50 MiB; depth images up to 25 MiB and 40 MP. With get_mask, describe the subject briefly, for example “person on the left”. Both tools are free, require generation permission and return a job to poll. Once completed, reuse the returned output asset ID as a reference. The original stays unchanged.

Credits, references and results

Generation spends your existing AIFlux credits. The daily limit is per key and resets at midnight UTC. Reading your balance and job status does not consume generation credits; it remains available after the key reaches its limit.

For local files, ask the assistant to create an upload slot, send the file to its upload URL and reuse the returned asset ID. Uploads are private, valid for seven days and limited to 1000 files or 10 GiB per account. Alternatively, use public HTTPS reference URLs. Generation still applies the website's normal input checks.

Use reference_image_asset_ids or reference_video_asset_ids for reusable media. Recent generation results also expose asset IDs. Choose either IDs or URLs for each media type, and keep combined files below 70 MiB. Video images are references: say in your prompt if one should open or close the video. Only Kling, Sora, FLUX 3, Grok and Wan 2.7 take them as first and optional last frames. Use the selected model's limits.

For Anima V2, use character_lora_id, character_weight (0–1.5; zero disables it) and natural_look (true/false). For Krea 2 Turbo, use lora_id, lora_weight (0.1–1.5) and natural_look. Find the correct ID with list_loras; shared LoRAs require the selected project.

Wan 3.0 and Prime also accept video and photo references together: pass direct MP4/MOV URLs in reference_video_urls and photos in reference_image_urls. Use @Video 1 and @Image 1 in your prompt; each list is numbered independently. Reference videos may total 15 seconds and 100 MiB through MCP. Reference plus output duration must fit within 30 seconds, and reference video seconds are included in the price. Use with_audio: true for output audio.

MAGI-2 takes the same two lists, with up to 5 videos and 10 photos. Its photos are always references, never first or last frames unless your prompt says so. It renders 1080p for 4 to 30 seconds, and references are not added to the price.

Quote first, then approve the cost. Every new generation needs a unique request_key and your approved max_credits. If the current price exceeds that ceiling, it is rejected before charging. Keep the returned job ID and poll it until completion.

If a response is lost, use get_request with the original key. Retrying identical parameters with that same key retrieves the original request; it does not create another generation. Never use a new key to retry an unknown outcome.

Results include download URLs and authentication instructions. Send the key only to app.aiflux.dev when required; never forward it to a CDN or another host.

This release covers Create and Video, including Wan 3.0 video/photo references. Cinema Studio, its director/3D workflow, video editing and audio reference uploads will be handled separately.

Troubleshooting

Video analysis: upload a private MP4/MOV with create_upload or reuse a completed video's asset ID. Pass it as video_asset_id to an analysis tool, with language: "en" or "it". For clothing or actions, subject: "person on the left" selects a subject; leave it empty to cover everyone separately. These calls send the clip to AIFlux's analysis provider and require the generation permission, but charge no credits and create no video. Uploads support 60 seconds; completed outputs support 120 seconds, both up to 100 MiB. Six analyses per minute are shared with Get Prompt. Descriptions are visual observations, with approximate timing and no audio transcription.

401: check the header, the “Bearer ” prefix and whether the key was revoked. Opening the endpoint directly in a browser without a key normally returns this response.

Credit limit: review your wallet and the connection's daily limit. Too many requests: wait for existing jobs to finish before trying again.

For other errors contact [email protected] with the job ID and error message. Do not send your API key.