The first three groups back the Serverless API (ComfyUI), the next two the Model API, and the training groups the Trainer API.
Serverless and Model API requests have similarly named tools. The Serverless ones (
get_request_status, get_request_result, cancel_request) always take a deployment_id; the Model API ones (get_model_request_status, and so on) take only a request_id. Mixing them up yields a 404.Deployment management
list_deployments
List all Serverless API deployments in your account.
Backs: GET /prod/v2/deployments
Example arguments:
get_deployment
Get one deployment by ID, optionally including its full workflow graph.
Backs: GET /prod/v2/deployments/{deployment_id}
Tip: Call withExample arguments:include_payload=trueto see every node’s ID and input names. Use those to build theoverridesobject forsubmit_request.
create_deployment
Create a new Serverless API (ComfyUI) deployment from a cloud-saved workflow.
Backs: POST /prod/v2/deployments
Hardware SKUs:
For LoRA deployments, create via the RunComfy UI (Trainer > LoRA Assets > Deploy), then uselist_deploymentsto get thedeployment_id.
update_deployment
Partially update a deployment. Only pass the fields you want to change.
Backs: PATCH /prod/v2/deployments/{deployment_id}
Example — pause a deployment:
delete_deployment
Permanently delete a deployment. This cannot be undone.
Backs: DELETE /prod/v2/deployments/{deployment_id}
Considerupdate_deploymentwithis_enabled=falseto pause instead of deleting.
Inference
submit_request
Submit an async inference request to a deployment.
Backs: POST /prod/v2/deployments/{deployment_id}/inference
Example — text-to-image with overrides:
Useget_deploymentwithinclude_payload=trueto discover the node IDs and input names for your workflow.
get_request_status
Poll a request’s current status.
Backs: GET /prod/v2/deployments/{deployment_id}/requests/{request_id}/status
Status lifecycle:
in_queue > in_progress > completed (or cancelled).
Example response:
get_request_result
Fetch the final outputs of a completed request.
Backs: GET /prod/v2/deployments/{deployment_id}/requests/{request_id}/result
Output URLs are hosted for 7 days after success. Download or copy them to your own storage for longer retention.
Example response:
cancel_request
Cancel a queued or running request.
Backs: POST /prod/v2/deployments/{deployment_id}/requests/{request_id}/cancel
Returns
cancelled if accepted, or not_cancellable if the request has already completed.
Example response:
Advanced
call_instance_proxy
Call a ComfyUI backend endpoint on a live instance.
Backs: POST /prod/v2/deployments/{deployment_id}/instances/{instance_id}/proxy/{comfy_backend_path}
Example — unload models to free GPU memory:
Instance IDs are ephemeral — they are only valid while the instance is running. If the instance shuts down, submit a new request to get a fresh instance.
Model catalog
Discovery for the Model API — hosted models you run on demand, with no deployment. Backs the Model Catalog Endpoints.list_models
Browse the hosted models run_model can run.
Backs: GET /v1/models
Example arguments:categoryis what the model does;kindis how it runs. Filter oncategoryunless you specifically care about the execution path. For a single model, preferget_modeloverinclude_schema.
base_price_usd is a base rate per price_unit (second for duration-billed models, otherwise output); most models multiply it by inputs like resolution or duration.
total is the count before paging — use it to decide whether to fetch another page.
list_model_categories
List the capability categories models are grouped into.
Backs: GET /v1/models/categories
Takes no parameters. Returns values such as text-to-image and image-to-video — pass one to list_models(category=...). Derived from the catalog, so it grows as new kinds of model are published.
get_model
Get one model’s full input schema before building a request.
Backs: GET /v1/models/{model_id}
input_schema is the JSON Schema for run_model’s inputs: property types, defaults, enums, and min/max ranges. Read it rather than guessing parameter names.
Example response:
title, x-order, x-rc-group-id, widget-style format values) are stripped, so format appears only where a field takes a public file URL.
Model inference
run_model
Run a hosted model on demand — no deployment needed.
Backs: POST /v1/models/{model_id}
File inputs must be publicly accessible HTTPS URLs that a plain unauthenticated GET can fetch. Unlike
submit_request, the Model API does not take Base64 data URIs.
Example arguments:
path accepts either a name from your LoRA Assets or a public URL — including a checkpoint URL from get_training_job_result.
get_model_request_status
Poll a Model API request’s status.
Backs: GET /v1/requests/{request_id}/status
Lifecycle:
in_queue → in_progress → completed / cancelled. While in_queue the payload also carries queue_position.
get_model_request_result
Fetch a completed Model API request’s outputs.
Backs: GET /v1/requests/{request_id}/result
The
output shape is defined by the model’s Output schema. Any hosted asset URLs found inside it are also flattened into output_urls for convenience.
Example response:
cancel_model_request
Cancel a queued Model API request.
Backs: POST /v1/requests/{request_id}/cancel
Returns
cancelled if accepted, or not_cancellable if the request is already in progress or finished.
Training datasets
Datasets for the Trainer API. Create one, upload media plus matching captions, then poll until it isREADY — only READY datasets can be mounted by a training job. Backs the Dataset endpoints.
create_dataset
Create an empty dataset.
Backs: POST /prod/v1/trainers/datasets
The
name — not the id — is what an AI Toolkit config references as /app/ai-toolkit/datasets/{dataset_name}. A new dataset starts in DRAFT.
list_datasets
List datasets in your account.
Backs: GET /prod/v1/trainers/datasets
The listing carries no per-file detail — use
get_dataset_status for a dataset’s files.
get_dataset_status
Get a dataset’s status and its successfully uploaded files.
Backs: GET /prod/v1/trainers/datasets/{dataset_id}/status
Lifecycle:
DRAFT → UPLOADING → READY, or FAILED (which sets error). Files still uploading or that failed do not appear in files.
delete_dataset
Permanently delete a dataset.
Backs: DELETE /prod/v1/trainers/datasets/{dataset_id}
This cannot be undone.
upload_dataset_file_from_url
Add one file to a dataset by fetching it from a public URL.
Backs: POST /prod/v1/trainers/datasets/{dataset_id}/upload
Each image or video needs a caption
.txt with the same base name: img_0001.jpg pairs with img_0001.txt. Re-uploading the same filename overwrites the previous copy.
upload_dataset_text_file
Write a caption straight into the dataset, with no file hosting needed.
Backs: POST /prod/v1/trainers/datasets/{dataset_id}/upload
Example arguments:
get_dataset_upload_urls
Get signed upload URLs for files the server cannot fetch itself.
Backs: POST /prod/v1/trainers/datasets/{dataset_id}/get-upload-endpoint
Use this for local files and anything over 150 MB, then
PUT each file’s bytes to the returned upload_url with the returned method and headers.
Example arguments:
PUT time. Signed URLs are short-lived; call again for a fresh one. After every PUT succeeds, poll get_dataset_status until READY.
Training jobs
AI Toolkit LoRA training. Backs the Training job endpoints.submit_training_job
Submit an AI Toolkit training job.
Backs: POST /prod/v1/trainers/ai-toolkit/jobs
Multi-GPU (
gpu_count: 8) is only supported on ADA_80_PLUS; the tool rejects other combinations before calling the API.
Two paths in the config are fixed by the platform:
training_foldermust be/app/ai-toolkit/output- the dataset’s
folder_pathmust be/app/ai-toolkit/datasets/{dataset_name}, wheredataset_nameis the dataset’s name, not its id
get_training_job_status.
get_training_job_status
Poll a training job’s status and step progress.
Backs: GET /prod/v1/trainers/ai-toolkit/jobs/{job_id}/status
Lifecycle:
IN_QUEUE → RUNNING → STOPPED (finished or preempted), FAILED (with an error), or CANCELED.
Example response:
get_training_job_result
Fetch a training job’s artifacts as hosted URLs.
Backs: GET /prod/v1/trainers/ai-toolkit/jobs/{job_id}/result
Returns checkpoints (
.safetensors), the resolved config, and sample outputs, flattened into artifact_urls. Safe to call while the job is still RUNNING — the list grows over time — and after a FAILED or CANCELED job to recover whatever was produced.
Feed a checkpoint URL to run_model as {"lora": {"path": "<url>"}} to run inference on it.
cancel_training_job
Cancel a queued or running training job.
Backs: POST /prod/v1/trainers/ai-toolkit/jobs/{job_id}/cancel
Progress stops, but
get_training_job_result still returns any checkpoints produced so far.
resume_training_job
Resume a stopped job from its latest checkpoint.
Backs: POST /prod/v1/trainers/ai-toolkit/jobs/{job_id}/resume
Reuses the same
job_id rather than creating a new job, restarting from the highest-step checkpoint (or step 0 if none exists). Useful after a preemption. For a FAILED job, read error from the status first and fix the cause — often via edit_training_job — before resuming.
edit_training_job
Replace the config of a non-running job.
Backs: POST /prod/v1/trainers/ai-toolkit/jobs/{job_id}/edit
Only works while the job is
STOPPED, CANCELED, or FAILED, and config.name must still match the original job’s name. GPU type and count are chosen at resume time, so call resume_training_job afterwards to re-queue.
Account
get_balance
Get the account’s remaining RunComfy balance.
Backs: GET /prod/v2/balance
Takes no parameters.
One wallet funds every product, so this is the figure Serverless deployments, run_model requests, and training jobs all draw down — and the one checked before work is allowed to start.
Example response:
balance_usd for reading and balance_microdollars (millionths of a dollar) for exact arithmetic and threshold checks. A zero balance is a normal response, not an error. See Balance for minimums and what the figure covers.