🔗API
Last updated
Last updated
Prst.ai offers a set of API using HTTP to control your prompt management outside the system. The API is designed to provide all important information to you with ability to manage your prompts programmatically.
PRST API requires authentication using API Credentials that can be created from UI of your prst.ai installation .
The API Credentials Key should be provided in Request Headers with prefix Bearer
in header value.
Prst.ai uses the path versions to differentiate between APIs. In cases when updates does not match with the API old scheme the new version will be used to access endpoint.
This approach helps your team to prevent issues after prst.ai version update.
The API returns Errors in the following structure:
💡 Note: If you see any unhandled error we will be glad to hear from you about that case.
Before installation you can check all available API in our publicly available Swagger.
💡 Note: If you didn't find API you're looking for, please contact us, maybe we have to update docs 😊
To be compatible with many container management solutions prst.ai provides a simple HTTP endpoint for the healthcek. using this endpoint it's possible to ensure stability of your solution.
By default health-check endpoint returns the actual version of prst.ai installation.
This API provides several alternative way to pass parameters. We believe that those options can make it more easier to integrate your AI pipelines with prst.ai
For example you can provide prompt parameters in the following way:
Or alternative one could be the following:
On addition to that it's possible to define execution behavior:
sync: the execution will be done within one session;
async: the execution will work as Fire-And-Forget and you will be able to check execution status later when it's needed.
Define your desired approach by configuring "async":true
parameter.
An alternative way to create prompt is API that uses prompt markup. To create a new prompt using this API you can simply call it with the following parameters:
In this case system will automatically create all related entities and will assign parameters.