Skip to main content

Introduction

Unstract provides an API-driven interface for executing workflows securely and efficiently using appropriate authentication methods.

Creating API Deployments

API deployments can be created directly from Prompt Studio, which automatically generates the necessary workflow behind the scenes. For detailed instructions, see Creating API Deployments from Prompt Studio.

To understand how workflows power API deployments, refer to the Workflow Setup Guide.

Once a workflow is deployed as an API, several actions become available, including triggering executions and checking the execution status. The deployment also offers a convenient option to download the Postman collection for each API, simplifying integration into your workflow. This collection is accessible from the Download Postman Collection option found in the Actions menu of each listed API in the API Deployment tab.

info
  • Replace Tools: The existing tool can be replaced with new one just by clicking Change Prompt studio project (step 3) and selecting the new project from the Tools list.
  • Live Updates: Any modifications to the tool or its settings will instantly update the behavior of your deployed API
  • Seamless Integration: The API endpoint remains the same, ensuring no disruption to applications already using your API
  • Real-time Configuration: Changes take effect immediately, allowing for quick iterations and improvements

These RESTful APIs can seamlessly integrate with your existing systems, offering flexibility and ease of use.

Smart File Handling

Unstract's API deployment is designed for independent execution processing:

  • Supports up to 32 files in a single call
  • Each API execution is independent of the previous runs and there's no caching involved
Important

Results are reported based on the file name, hence ensure all files have unique names within each API execution to avoid any unexpected behavior.

API Endpoints

EndpointDescription
Execution APIExecute a deployed API with the desired inputs.
Status APIRetrieve the status of an execution. Useful for checking execution status in async mode.

Base URL

The base URL for all the APIs is

https://us-central.unstract.com/

Authentication

All APIs require an API key for authentication. You can obtain your API key from the Postman collection or from the Manage Keys section within the API Deployments page. The key must be included in the request header (Authorization) as a Bearer token.

Example Request

curl -X POST --location 'https://us-central.unstract.com/deployment/api/organization123/apiname/' \
--header 'Authorization: Bearer <Api Key>' \
--form 'files=@"/home/user/Downloads/file_1.pdf"' \
--form 'files=@"/home/user/Downloads/file_2.pdf"'