Skip to content

Course 2: Building with MIFY — Chapter 3

Generate images, video, and text through MIFY’s three execution paths.

  • The three content generation paths
  • How to submit generation jobs via API
  • How to track job status and retrieve results

MIFY Content Generation

PathAPI EndpointHow It Works
MIFY QueuePOST /api/content-gen/queueAsync — submits to GPU providers, webhook callback
AI ProviderPOST /api/content-gen/providerSync or SSE streaming
ComfyUI LocalPOST /api/content-gen/comfyui-local/finalizeLocal GPU execution

Fastest for text and quick image generation:

Terminal window
curl -X POST \
-H "Authorization: Bearer mify_xxx" \
-H "Content-Type: application/json" \
-d '{
"provider": "OpenAI",
"model": "gpt-4o",
"input": {"prompt": "Write a product description for a smart water bottle"},
"outputType": "text"
}' \
https://your-instance/api/content-gen/provider

For high-quality image/video generation:

Terminal window
curl -X POST \
-H "Authorization: Bearer mify_xxx" \
-H "Content-Type: application/json" \
-d '{
"workflowSlug": "sdxl-txt2img",
"overrides": {"positive_prompt": "a sunset over mountains, photorealistic"},
"idempotencyKey": "unique-key-123"
}' \
https://your-instance/api/content-gen/queue

Returns a runId. Check status:

Terminal window
curl -H "Authorization: Bearer mify_xxx" \
https://your-instance/api/content-gen/runs/{runId}
Terminal window
# List all your generations
curl -H "Authorization: Bearer mify_xxx" \
https://your-instance/api/content-gen/runs
# Delete from history
curl -X DELETE -H "Authorization: Bearer mify_xxx" \
https://your-instance/api/content-gen/runs/{runId}
  1. Generate text via the Provider path using curl
  2. Submit an image generation job via the Queue path
  3. Poll the run status until it completes
  4. List all your generation history via API
  5. Try the same in the UI at /content-gen

Previous: Chapter 2 — RAG Pipeline | Next: Chapter 4 — Creating a Plugin