> ## Documentation Index
> Fetch the complete documentation index at: https://docs.strangelooplabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Invocation Output

> Fetching the status and output of an invocation

Once an invocation has been initiated, you can fetch the status and output of it
using the ID. It is expected that an invocation will take time to finish. While it is
in progress, a `status` field will indicate it as `Pending` or `Running`. Once the invocation
has finished, the `status` will be set to `Complete`.

```
GET https://api.strangelooplabs.ai/automations/<automation_id>/invocations/<invocation_id>
```

### Request

<ParamField body="automation_id" type="string">
  The ID of the automation that was invoked.
</ParamField>

<ParamField body="invocation_id" type="string">
  The ID of the invocation. This is the value returned when the invocation was initiated.
</ParamField>

### Response

<ResponseField name="id" type="string">
  The unique identifier for this invocation.
</ResponseField>

<ResponseField name="status" type="string">
  The status of the invocation. Possible values:

  * Pending: The invocation has been queued for execution.
  * Running: The invocation is currently running.
  * Complete: The invocation has finished successfully.
  * Failed: The invocation has finished unsuccessfully.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO-8601 timestamp indicating when the invocation began.
</ResponseField>

<ResponseField name="files" type="array">
  An array indicating the files that were used as input to the invocation, if any.
</ResponseField>

<ResponseField name="finished_at" type="string">
  If the invocation has completed, an ISO-8601 timestamp indicating when it completed.
</ResponseField>

<ResponseField name="input" type="string">
  The input to the invocation. If files were present, this will include data extracted from the files.
</ResponseField>

<ResponseField name="output_url" type="string">
  A presigned URL, from where the output of the invocation can be downloaded.
</ResponseField>

<ResponseField name="failure_reason" type="string">
  If `status` is `Failed`, then this field indicates the reason for the failure.
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
  curl https://api.strangelooplabs.ai/automations/automation-123/invocations/invocation-123
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "id": "invocation-123",
      "created_at": "2024-01-01T00:00:00.000000+00:00",
      "files": [
          {
              "extension": "pdf",
              "file_id": "file-123",
              "url": "https://strangeloop-automations-documents.s3.amazonaws.com/file-123.pdf?auth_parameters"
          }
      ],
      "finished_at": "2024-01-01T00:00:10.000000+00:00",
      "input": "raw file text",
      "output_url": "https://strangeloop-automations-documents.s3.amazonaws.com/output-id.txt?auth_parameters",
      "status": "Complete"
  }
  ```
</ResponseExample>
