Prompts

Serialize

Serialize a Prompt to the .prompt file format.

Useful for storing the Prompt with your code in a version control system, or for editing with an AI tool.

By default, the deployed version of the Prompt is returned. Use the query parameters version_id or environment to target a specific version of the Prompt.

get/prompts/{id}/serialize

Request

  • Base URL: https://api.humanloop.com/v5
  • URL: https://api.humanloop.com/v5/prompts/{id}/serialize
  • Auth: API key in header X-API-KEY

Path parameters

idstring required

Unique identifier for Prompt.

Query parameters

version_idstring

A specific Version ID of the Prompt to retrieve.

environmentstring

Name of the Environment to retrieve a deployed Version from.

Response

Response with status 200

object required

Changes

No recorded changes to this operation across all 1 revision of this API.