---
title: "Get an Agent Observability prompt"
method: GET
path: "/api/v2/llm-obs/v1/prompts/{prompt_id}"
tags: ["Agent Observability"]
---

# Get an Agent Observability prompt

`GET /api/v2/llm-obs/v1/prompts/{prompt_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/{prompt_id}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/llm-obs/v1/prompts/:prompt_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Get the latest version of an Agent Observability prompt by prompt ID.

## Path parameters

- `prompt_id` string, required

## Query parameters

- `label` string

## Response `200`

OK

- LLMObsPromptSDKResponse: Response containing a flattened Agent Observability prompt version for SDK consumption.
  - `data` LLMObsPromptSDKData, required: Data object for a flattened Agent Observability prompt version returned for SDK consumption.
    - `attributes` LLMObsPromptSDKDataAttributes, required: Attributes of a flattened prompt version returned for SDK consumption. Exactly one of `template` and `chat_template` is returned. Empty `config` is omitted when configuration authoring is disabled for the organization. Non-empty saved configuration is always returned.
      - `chat_template` LLMObsPromptChatTemplateItem[]: Chat template for this prompt version, as a list of messages and named message placeholders. Omitted for text templates. **Preview:** Message placeholders are available in Preview. To request access, contact [Datadog Support](https://www.datadoghq.com/support/) or your Customer Success Manager.
        - union: A chat message or a named message placeholder in a prompt template.
          - LLMObsPromptChatMessage: A single chat message in a prompt template.
            - `content` string, required: Content of the message.
            - `role` string, required: Role of the message (for example `system`, `user`, or `assistant`).
          - LLMObsPromptMessagePlaceholder: A named placeholder that inserts a list of messages when a compatible SDK formats the prompt. **Preview:** Message placeholders are available in Preview. To request access, contact [Datadog Support](https://www.datadoghq.com/support/) or your Customer Success Manager.
            - `name` string, required: Name used to supply the message list when formatting the prompt.
            - `type` 'placeholder', required: Type of chat-template item.
      - `config` LLMObsPromptConfig: Versioned prompt configuration is in Preview. To request access, contact [Datadog Support](https://www.datadoghq.com/support/) or your Customer Success Manager. Customer-owned configuration delivered with a prompt version. Datadog stores and returns the object without interpolating it, validating provider-specific keys, or applying it to model calls. Do not include secrets.
      - `labels` string[]: Labels attached to the selected version.
      - `prompt_id` string: Customer-provided identifier of the prompt.
      - `prompt_version_uuid` string: Unique identifier of this prompt version.
      - `template` string: Text template for this prompt version. Omitted for chat templates.
      - `version` string: Version identifier for this prompt version. This is the sequential version number unless a user-supplied version identifier was set, in which case that identifier is used instead.
    - `id` string, required: Unique identifier of the prompt.
    - `type` 'prompt-templates', required: Resource type of an Agent Observability prompt.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/c555647b183a?raw)
