Text to Image
Generate images from natural-language prompts with selectable models, aspect ratios, resolutions, and seeds.
Server MCP di Flaq AI
Give Cursor, OpenAI Codex, Claude Code, Hermes, and Grok Build direct access to Flaq AI media generation through one hosted MCP endpoint. Flaq MCP wraps Flaq's image and video generation APIs so an agent can discover available models, submit generation tasks, and poll for completed results without a separate REST API integration.
Funzionalità
Flaq MCP exposes the core media generation workflows agents need through a compact tool surface. The current catalog spans image and video generation across text and image inputs, and agents can discover supported models at runtime with list_models.
Generate images from natural-language prompts with selectable models, aspect ratios, resolutions, and seeds.
Edit or transform public HTTPS images with a prompt and optional multi-image references.
Create video clips from text prompts with model-specific duration, ratio, resolution, sound, and negative prompt options.
Animate a public HTTPS image by sending an image URL with the shared video generation tool.
Connessione
Follow these steps once for your preferred client. Flaq uses direct stateless HTTP with an Authorization header and does not require mcp-remote, mcp-session-id, sticky sessions, or any locally installed MCP server package.
Get Your API Key
Create or copy your API Key from Flaq, then keep it ready for the client configuration. Replace <YOUR_API_KEY> with the real key; do not leave the placeholder in the saved file.
Add Flaq MCP to Your Agent
Choose your MCP client below, copy its configuration into the indicated file, and preserve any unrelated settings already present in that file.
Add Flaq as a global Cursor MCP server so its media generation tools are available across workspaces.
Cursor MCP configuration
~/.cursor/mcp.jsonAfter saving the file, open Cursor Settings, go to MCP, and restart flaq-ai.
Save, Restart, and Verify the Connection
Save the configuration and restart or reload the MCP connection. Ask the agent to call list_models; a successful response confirms that the endpoint is connected and the Flaq tools are discoverable.
Copy this prompt into your connected agent after it restarts.
Verify Flaq MCP with list_models
Run Your First Media Generation
After model discovery succeeds, ask the agent to generate an image. The agent should submit the task once, keep the returned taskId, and call get_task_result until the task succeeds or fails.
This prompt tests model discovery, paid submission, and result polling in one guided request.
Generate a First Image with Flaq MCP
Flusso di lavoro
The MCP server uses an asynchronous task workflow. A successful submission means the task was accepted; the agent must continue polling until it succeeds or fails.
Call list_models to find available image and video models and their supported operations.
Call text_to_image, image_to_image, or generate_video once and save the returned taskId.
Call get_task_result with the task ID and media type until processing changes to succeed or failed.
When the task succeeds, read the generated image or video links from the urls array.
Send a UUID as idempotency_key with every paid submission. If an agent retries, reuse the same key instead of creating another charged task. If you already have a taskId, continue polling that task rather than submitting again.
Strumenti
The server keeps discovery, submission, and polling separate so agents can choose a compatible model, avoid duplicate submissions, and wait for asynchronous media generation safely.
list_modelslist_models returns the current model catalog and the operations supported by each image or video model.
text_to_imagetext_to_image accepts a prompt and optional model, ratio, resolution, seed, translation, and idempotency settings.
image_to_imageimage_to_image accepts a prompt and a public HTTPS image URL, with optional additional image references and generation settings.
generate_videogenerate_video creates text-to-video when image_url is omitted and image-to-video when a public image URL is provided.
get_task_resultget_task_result returns processing, succeed, or failed and includes generated URLs when the task completes successfully.
Avvio rapido
These direct JSON-RPC requests are useful for checking the endpoint before configuring an agent. Listing models is free; submitting a generation task consumes credits.
Confirm that the public MCP endpoint responds and returns the current model catalog.
1. List models without an API Key
Replace the API Key and UUID placeholders before running this paid request.
2. Submit a text-to-image task
taskId returned by the submission response.processing, call get_task_result again.3. Poll the task result
MCP tool responses wrap the generation result as a JSON string in result.content[0].text. Parse that text value to read status, taskId, errorCode, and urls.
Riferimento
Call list_models for the current catalog instead of relying on a hard-coded model list. When model_name is omitted, Flaq selects the defaults below for each workflow.
Each API Key can have up to two generation submissions in progress at the same time.
Prompts can contain up to 4,000 characters.
Image inputs must be publicly accessible HTTPS URLs; local file paths are not supported.
A polling call waits up to 50 seconds by default and should remain below the client tool timeout.
Submitting text_to_image, image_to_image, or generate_video consumes credits. list_models and result polling do not consume credits.
The MCP server does not currently support first-and-last-frame video, reference-to-video, or video editing workflows.
Risoluzione dei problemi
Create an API Key, connect your preferred agent, and let it discover the image and video models available through Flaq.
Generated media links and model availability may change over time. Use list_models at runtime and store the taskId returned by every submission.