Introduction
orq.ai exposes API to manipulate Prompts. These APIs are used to manage and enrich Prompts programmatically. In this page we’ll see the common use cases for creating and fetching prompts through the API.Prerequisite
To get started, an API key is needed to use within SDKs or HTTP API. To get an API key ready, see AuthenticationSDKs
Use the SDKs for Node.js and Python.Creating a Prompt
To create a Prompt, we’ll be using the Create a Prompt API. The expected Payload contains many information to define and parameter the Prompt:- Name, Description and Path for global configuration.
- Model Configuration, containing model details, parameters and provider.
- Messages defining the messages sent to the prompt.
- Metadata further enriching the prompts information.
Fetching a Prompt
To fetch a Prompt we’ll be using the Retrieve a Prompt API. A Prompt ID is needed as path parameter for this call. The API call looks as follow:Once a Prompt is created, it can be used in other modules such a Playground , Experiment, or Deployment.