Deploying your prompt creates a dedicated API endpoint that uses your Prompt Template. You can call this API with just the variables, making integration to your app much easier!

Thanks to the Cloudflare Global network, these API benefit from low latency and reliable, high availability.

1

Prerequisites

Before moving on, make sure you have:

  • A Langtail account (create one here)
  • Open a Prompt that you can use. You can use this Prompt Example
  • You can save the example using the “Save as” button like this:

2

Deploy Prompt

  1. In the upper menu, click Deploy.
  2. Choose the Preview environment.
  3. Click the success message in the lower-right corner to open the deployments tab.
  4. Press the deployment URL to see how to use the deployments.
3

Call the Deployment API

  1. Press Generate API Key.
  2. To invoke the deployment with an example API request, click “Make a Request”.
  3. You can also copy the code snippet and run it yourself.
  4. Check the logs to observe requests to the deployed API.
  5. Click on a log to see detailed information about the request and response from OpenAI.
You can read the full API Reference which describes all the request body fields in detail.