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.

Path parameters

idstringRequired

Unique identifier for Prompt.

Headers

X-API-KEYstringRequired

Query parameters

version_idstringOptional

A specific Version ID of the Prompt to retrieve.

environmentstringOptional

Name of the Environment to retrieve a deployed Version from.

Response

This endpoint returns an object.

Errors