Get Workflow Run

Prev Next
Get
/workflow/{workflow_id}/run/{run_id}

You can view the details of a workflow run via the API.

Get Workflow Run

To view a workflow run, send a GET request to https://api.copy.ai/api/workflow/<workflow_id>/run/<run_id>.

You will receive a response with the details of the workflow run.

For example:

JSON
{
	"status": "success",
	"data": {
		"status": "COMPLETE",
		"input": {
			"Input 1": "Inputs vary depending on the workflow used.",
      "Input 2": "The best way to see an example is to try it!"
		},
		"output": {
			"Output 1": "Outputs vary depending on the workflow used.",
			"Output 2": "The best way to see an example is to try it!"
		},
		"metadata": {
      "api": true
    },
		"createdAt": "2023-04-06T22:34:46.704Z",
		"id": "<run_id>",
		"credits": 2
	}
}


Run status types

StatusDescription
NEWThe workflow run has just been created and is ready to be queued for processing.
WAITINGThe workflow run is waiting for required resources or conditions to be met before it can proceed.
PROCESSINGThe workflow run is currently being executed and processed.
COMPLETEThe workflow run has successfully finished processing and all steps have been completed.
RETRYINGThe workflow run encountered an issue and is retrying the failed steps before proceeding.
FAILEDThe workflow run has failed to complete due to an error, and further retries were unsuccessful.


Track or poll for progress

This endpoint can be used to check the progress of your workflow run in real-time.

You can do this by repeatedly calling the endpoint with a short delay between requests.

When the workflow is done running, the status will change to COMPLETE.

Security
API Key: ApiKeyAuth
Header parameter namex-copy-ai-api-key

Copy.ai API key for authentication

Header parameters
x-copy-ai-api-key
stringRequired

Copy.ai API key

Path parameters
workflow_id
stringRequired

ID of the workflow

run_id
stringRequired

ID of the workflow run

Responses
200

Success

success
{
  "status": "success",
  "data": {
    "output": {
      "text": "workflow run output"
    },
    "metadata": {
      "interestingValue": "doublelyInterestingValue"
    },
    "createdAt": "2023-09-27T18:34:13.091Z",
    "id": "WRUN-dc46baf3-cb19-4424-be04-95ba630409bf",
    "workflowRunId": "WRUN-dc46baf3-cb19-4424-be04-95ba630409bf",
    "workflowId": "WCFG-84e56597-ebaf-4b49-a98c-75cacd4aecaa",
    "credits": "9001"
  }
}
Expand All
object
status
string
data
object (WorkflowRunData)
id
string
workflowRunId
string
workflowId
string
output
object
metadata
object
createdAt
string (date-time)
credits
integer
400

Bad Request

404

Not Found

notFound
{
  "status": "error",
  "errorCode": "NOT_FOUND"
}
object
status
string
errorCode
string