Skip to main content

Overview

The get() method allows you to retrieve a specific prompt by its unique identifier. This returns the complete prompt information including content, variables, and metadata.

Usage example

Parameters

string
The unique identifier of the prompt to retrieve.

Returns

Returns a Prompt object containing the complete prompt information:

Examples

Basic Synchronous Example

Error Handling for Missing Prompts

Detailed Prompt Information

Asynchronous Example

Asynchronous with Multiple Prompts

Convenience Functions

You can also use the convenience function to create a PromptAPI client: