Skip to main content
The Netra SDK exposes a prompts API that lets you:
  • Fetch managed prompts – Retrieve prompt versions by name and label from the Netra backend
  • Use labels for versioning – Target specific prompt versions such as "production", "staging", or any custom label
  • Integrate seamlessly – Drop fetched prompts directly into your LLM calls with zero boilerplate
This page shows how to use the get_prompt utility in Netra to fetch and use your managed prompts.

Getting Started

The prompts client is initialized automatically when you call Netra.init. No additional flags are required as long as a valid OTLP endpoint and API key are configured, prompts are ready to use.

get_prompt

Fetch a prompt version by name and label from the Netra backend.

Parameters

Return Value

Configuration

Required

get_prompt relies on the OTLP endpoint and API key configured via Netra.init or environment variables.

Error Handling

get_prompt is designed to never throw. Errors are logged and a safe fallback value is returned so your application keeps running.
Common error scenarios and their log messages:

Complete Example

Next Steps

Last modified on May 14, 2026