Inference
Create response
Generate an image or video from a text prompt, or transform an existing image. Built on the Open Responses spec, a provider-agnostic API standard.
- Text → image and image → image: Use FLUX models (
black-forest-labs/FLUX.2-dev) - Text → video and image → video: Use Wan models (
Wan-AI/Wan2.2-T2V-A14B-Diffusers,Wan-AI/Wan2.2-I2V-A14B-Diffusers)
Pass a plain string as input for text-to-image/video. Pass a structured content array for image-to-image/video.
POST
Authorizations
Modular Cloud API token. Obtain from the API Tokens page.
Body
application/json
Model identifier. See the supported models page.
Example:
"black-forest-labs/FLUX.2-dev"
Model input. Pass a plain string for text-to-image/video, or a structured content array for image-to-image/video.
Random seed for reproducible outputs.
Previous
Create deploymentCreate a new dedicated inference endpoint. `name` and `model_id` are immutable after creation.
> **Not yet available.** Self-serve deployment creation is coming soon. [Sign up for private preview access](https://console.modular.com/signup) to be notified when it launches.
Next