Skip to main content
Discover how to get your prompt. You can do it with a single line of code or specify a version or tag.

Single line of code

You can get your prompt with a single line of code.

Get a specific Tag

You can retrieve a specific tag of a prompt by providing the tag parameter.
If both version and tag are provided, version takes precedence. If neither is provided, the system attempts to find the production tagged version

Get a specific Version

You can retrieve a specific version of a prompt by providing the version parameter.

Replace Variables

If your prompt contains variables (e.g., {{name}}), you can replace them with actual values when retrieving the prompt:

Returned data

When you retrieve a prompt, the SDK returns the prompt (user and system) along with its model configuration.

Example response

Response example

Error handling

Discover how to properly handle errors comming from the SDK and/or the API by checking the Error Handling documentation

Caching