73 lines
2.1 KiB
Markdown
73 lines
2.1 KiB
Markdown
---
|
|
title: "OpenAPI Specification"
|
|
description: "Machine-readable OpenAPI specification for Comfy Cloud API"
|
|
openapi: "/openapi-cloud.yaml"
|
|
---
|
|
|
|
<Warning>
|
|
**Experimental API:** This API is experimental and subject to change. Endpoints, request/response formats, and behavior may be modified without notice.
|
|
</Warning>
|
|
|
|
# Comfy Cloud API Specification
|
|
|
|
This page provides the complete OpenAPI 3.0 specification for the Comfy Cloud API.
|
|
|
|
<Note>
|
|
**Subscription Required:** Running workflows via the API requires an active Comfy Cloud subscription. See [pricing plans](https://www.comfy.org/cloud/pricing?utm_source=docs&utm_campaign=cloud-api) for details.
|
|
</Note>
|
|
|
|
## Interactive API Reference
|
|
|
|
Explore the full API with interactive documentation:
|
|
|
|
<Card title="Cloud API Reference" icon="code" href="/api-reference/cloud/overview">
|
|
Browse endpoints, view schemas, and try requests
|
|
</Card>
|
|
|
|
## Using the Specification
|
|
|
|
The OpenAPI spec can be used to:
|
|
|
|
- **Generate client libraries** in any language using tools like [OpenAPI Generator](https://openapi-generator.tech/)
|
|
- **Import into API tools** like Postman, Insomnia, or Paw
|
|
- **Generate documentation** using tools like Redoc or Swagger UI
|
|
- **Validate requests** in your application
|
|
|
|
## Download
|
|
|
|
You can download the raw OpenAPI specification file:
|
|
|
|
<Card title="openapi-cloud.yaml" icon="download" href="https://raw.githubusercontent.com/Comfy-Org/docs/main/openapi-cloud.yaml">
|
|
Download the OpenAPI 3.0 specification
|
|
</Card>
|
|
|
|
## Authentication
|
|
|
|
All API requests require an API key passed in the `X-API-Key` header.
|
|
|
|
### Getting an API Key
|
|
|
|
See the [Cloud API Overview](/development/cloud/overview#getting-an-api-key) for step-by-step instructions with screenshots.
|
|
|
|
### Using the API Key
|
|
|
|
```yaml
|
|
X-API-Key: your-api-key
|
|
```
|
|
|
|
## Base URL
|
|
|
|
| Environment | URL |
|
|
|-------------|-----|
|
|
| Production | `https://cloud.comfy.org` |
|
|
|
|
## WebSocket Connection
|
|
|
|
For real-time updates, connect to the WebSocket endpoint:
|
|
|
|
```
|
|
wss://cloud.comfy.org/ws?clientId={uuid}&token={api_key}
|
|
```
|
|
|
|
See the [API Reference](/development/cloud/api-reference#websocket-for-real-time-progress) for message types and handling.
|