Workflows
Workflows define how images are processed. Each workflow contains a series of components (input, processing steps, export) and has a price in credits.
List Workflows
Section titled “List Workflows”Get all saved workflows for an organization.
GET https://api.autoretouch.com/v1/workflowQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
organization | string | - | Organization ID (recommended) |
limit | integer | 50 | Maximum results per page |
offset | integer | 0 | Number of results to skip |
Request
Section titled “Request”curl -X GET "https://api.autoretouch.com/v1/workflow?organization={organizationId}&limit=50&offset=0" \ -H "Authorization: Bearer {accessToken}"import requests
response = requests.get( "https://api.autoretouch.com/v1/workflow", params={ "organization": organization_id, "limit": 50, "offset": 0 }, headers={"Authorization": f"Bearer {access_token}"})data = response.json()
for workflow in data["entries"]: print(f"{workflow['name']}: {workflow['id']}")Success Response (200)
Section titled “Success Response (200)”{ "entries": [ { "id": "a0f0b604-85c0-45fd-85cf-4428bb3941ba", "version": "cd1be60e-6574-44aa-b1cf-f49f9028d56d", "name": "Background Removal", "date": "2020-03-13T09:26:37.705284Z", "author": { "id": "google-oauth2|123456789", "firstName": null, "lastName": null, "email": null }, "workflowComponents": [ { "type": "input", "label": "input", "settings": {} }, { "type": "export", "label": "export", "settings": {} } ], "executionPrice": 10 } ], "total": 1}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
entries | array | List of workflows |
total | integer | Total number of workflows |
Workflow Object
Section titled “Workflow Object”| Field | Type | Description |
|---|---|---|
id | string | Workflow ID (UUID) |
version | string | Current workflow version ID |
name | string | Display name |
date | string | Last modified timestamp (ISO 8601) |
author | object | Creator information |
workflowComponents | array | List of processing components |
executionPrice | integer | Cost in credits per execution |
Get Workflow Details
Section titled “Get Workflow Details”Get details of a specific workflow including all component settings.
GET https://api.autoretouch.com/v1/workflow/{workflowId}Path Parameters
Section titled “Path Parameters”| Parameter | Type | Description |
|---|---|---|
workflowId | string | Workflow ID |
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Description |
|---|---|---|
organization | string | Organization ID (recommended) |
Request
Section titled “Request”curl -X GET "https://api.autoretouch.com/v1/workflow/{workflowId}?organization={organizationId}" \ -H "Authorization: Bearer {accessToken}"import requests
response = requests.get( f"https://api.autoretouch.com/v1/workflow/{workflow_id}", params={"organization": organization_id}, headers={"Authorization": f"Bearer {access_token}"})workflow = response.json()
print(f"Workflow: {workflow['name']}")print(f"Price: {workflow['executionPrice']} credits")print(f"Components: {len(workflow['workflowComponents'])}")Success Response (200)
Section titled “Success Response (200)”{ "id": "a0f0b604-85c0-45fd-85cf-4428bb3941ba", "version": "cd1be60e-6574-44aa-b1cf-f49f9028d56d", "name": "Background Removal", "date": "2020-03-13T09:26:37.705284Z", "author": { "id": "google-oauth2|123456789", "firstName": null, "lastName": null, "email": null }, "workflowComponents": [ { "type": "input", "label": "input", "settings": {} }, { "type": "export", "label": "export", "settings": { "targetFormat": "PNG", "targetMode": "RGBA" } } ], "executionPrice": 10}Workflow Components
Section titled “Workflow Components”Each workflow contains a sequence of components:
| Type | Description |
|---|---|
input | Image input configuration |
export | Output format settings (PNG, JPEG, etc.) |
| Other types | Processing components (background removal, color correction, etc.) |
The settings object within each component contains component-specific configuration.
Error Response (404)
Section titled “Error Response (404)”Workflow not found or you don’t have access:
{ "timestamp": "2020-09-07T13:09:37.000+00:00", "status": 404, "error": "Not Found", "message": "", "path": "/v1/workflow/invalid-id"}