> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-dev-api-v1.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Developer API Overview

> Programmatic access to ComfyUI Cloud for building applications and automations

The ComfyUI Cloud Developer API provides a clean, SDK-friendly interface for running ComfyUI workflows programmatically. Use it to build applications, batch processing pipelines, or integrate AI image generation into your products.

## Why Use the Developer API?

<CardGroup cols={2}>
  <Card title="Clean REST Semantics" icon="code">
    Designed for developers, not constrained by ComfyUI frontend compatibility
  </Card>

  <Card title="Official SDKs" icon="box">
    Type-safe clients for Python, JavaScript, and Go
  </Card>

  <Card title="Real-time Events" icon="bolt">
    WebSocket streaming for live progress updates
  </Card>

  <Card title="Webhooks" icon="webhook">
    Push notifications when jobs complete
  </Card>
</CardGroup>

## Core Concepts

### Resources

| Resource     | Description                                                 |
| ------------ | ----------------------------------------------------------- |
| **Inputs**   | Files you upload for use in workflows (images, masks, etc.) |
| **Models**   | Custom models you bring (BYOM - Bring Your Own Model)       |
| **Jobs**     | Workflow executions                                         |
| **Outputs**  | Generated files from completed jobs                         |
| **Archives** | Bulk ZIP downloads of multiple job outputs                  |
| **Webhooks** | Event notifications to your server                          |

### Async Patterns

Many operations are asynchronous:

1. **Create** - Returns `202 Accepted` with resource in pending state
2. **Poll** - Check status until `ready` or `failed`
3. **Use** - Access the resource once ready

```python theme={null}
# Example: Upload from URL (async operation)
input = client.inputs.from_url("https://example.com/image.png")
# Status is "downloading"

# Poll for completion
while input.status == "downloading":
    time.sleep(1)
    input = client.inputs.get(input.id)

# Now ready to use
print(input.name)  # Use this in your workflow
```

Or use WebSockets for real-time updates without polling.

## Quick Example

```python theme={null}
from comfy_cloud import ComfyCloudClient

client = ComfyCloudClient(api_key="comfyui-...")

with client:
    # Run a workflow
    job = client.jobs.create(
        workflow={
            "3": {
                "class_type": "KSampler",
                "inputs": {"seed": 42, "steps": 20, ...}
            },
            # ... rest of workflow
        },
        tags=["my-app", "batch-1"],
    )
    
    # Wait for completion
    while job.status == "pending":
        job = client.jobs.get(job.id)
    
    # Get outputs
    outputs = client.outputs.list(job_id=job.id)
    for output in outputs.outputs:
        print(f"Download: {output.download_url}")
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/cloud/sdk/authentication">
    Get your API key and authenticate requests
  </Card>

  <Card title="Python SDK" icon="python" href="/cloud/sdk/python">
    Full Python SDK reference and examples
  </Card>

  <Card title="WebSockets" icon="plug" href="/cloud/sdk/websockets">
    Real-time event streaming
  </Card>

  <Card title="Webhooks" icon="bell" href="/cloud/sdk/webhooks">
    Push notifications for job events
  </Card>
</CardGroup>
