Skip to main content

What Is the Model API?

The RunComfy Model API gives you a unified, production‑ready RESTful API to run any model inside the RunComfy Playground. RunComfy handles queuing, rate-limit, monitoring and smart routing, etc., then returns a request ID immediately and hosted CDN URLs when the run completes. Integrate once and reuse across all models.

Choose the Model

In this example, we’ll use one of our most popular models, blackforestlabs/flux-1-kontext/pro/edit. Its model_id is blackforestlabs/flux-1-kontext/pro/edit, which you’ll call via the Async Queue API at the Base URL https://model-api.runcomfy.net. Alt RunComfy model id

Authentication

All API calls require a Bearer token. Add the header Authorization: Bearer <token> to every request (replace <token> with your API key). Get your API key from the Profile page (click your profile icon in the upper-right).

Submit a Request

Create a JSON body that matches this model’s input schema. On success you’ll receive a request_id and resource CDN URLs. If the model API expects input files, please pass public HTTPS URLs that can be fetched from RunComfy server‑side. Request Example
curl --request POST \
  --url https://model-api.runcomfy.net/v1/models/blackforestlabs/flux-1-kontext/pro/edit \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer <token>" \
  --data '{
    "prompt": "She is now holding an orange umbrella and smiling",
    "image_url": "https://playgrounds-storage-public.runcomfy.net/tools/7063/media-files/usecase1-1-input.webp",
    "seed": 81030369,
    "aspect_ratio": "16:9"
  }'
Tip: Please follow model’s Input schema (API/Schema → properties). You can view the schema on the model’s API page in the Playground: blackforestlabs/flux-1-kontext/pro/edit API page. Alt RunComfy playground model input schema

Monitor Request Status

Poll GET /v1/requests/{request_id}/status until the request moves through in_queuein_progresscompleted. Request Example
curl --request GET \
  --url https://model-api.runcomfy.net/v1/requests/{request_id}/status \
  --header "Authorization: Bearer <token>"

Retrieve Request Results

Call GET /v1/requests/{request_id}/result to fetch outputs (e.g., an image URL) Request Example
curl --request GET \
  --url https://model-api.runcomfy.net/v1/requests/{request_id}/result \
  --header "Authorization: Bearer <token>"