For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
DocsReferenceChangelog
DocsReferenceChangelog
  • Introduction
    • Overview
    • Errors
  • SDK
    • Overview
    • Decorators
    • Run Evaluation
  • API
      • POSTLog to a Prompt
      • PATCHUpdate Prompt Log
      • STREAMCall Prompt
      • GETList Prompts
      • POSTUpsert Prompt
      • GETGet Prompt
      • DELDelete Prompt
      • PATCHMove Prompt
      • POSTPopulate Prompt template
      • GETList Versions of a Prompt
      • DELDelete Prompt Version
      • PATCHUpdate Prompt Version
      • POSTDeploy Prompt
      • DELRemove Deployment
      • GETList a Prompt's Environments
      • POSTUpdate Monitoring
      • GETSerialize
      • POSTDeserialize
LogoLogo
Sign inBook a demo
APIPrompts

Serialize

GET
https://api.humanloop.com/v5/prompts/:id/serialize
GET
/v5/prompts/:id/serialize
$curl https://api.humanloop.com/v5/prompts/id/serialize \
> -H "X-API-KEY: <apiKey>"
1"string"

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.

Was this page helpful?
Previous

Deserialize

Next
Built with

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

idstringRequired
Unique identifier for Prompt.

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

422
Serialize Prompts ID Serialize Get Request Unprocessable Entity Error