> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Read prompts SDK Reference

> SDK reference for Read prompts in the Prompts API, available in Node.js and Python.

## Prompts

### List Prompts

Returns a list of your prompts. The prompts are returned sorted by creation date, with the most recent prompts appearing first

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.prompts.list(limit=10)

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.prompts.list({});

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "limit": Optional[int],
    "starting_after": Optional[str],
    "ending_before": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  limit?: number;
  startingAfter?: string;
  endingBefore?: string;
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "object": Literal["list"],
    "data": [{
        "id": str,
        "type": Literal["prompt"],
        "owner": str,
        "domain_id": str,
        "created": str,
        "updated": str,
        "created_by_id": Optional[str],
        "updated_by_id": Optional[str],
        "display_name": str,
        "description": Optional[str],
        "prompt_config": {  # optional
            "stream": Optional[bool],
            "model": Optional[str],
            "model_db_id": Optional[str],
            "model_type": Optional[Literal["chat", "completion", "embedding", "image", "tts", "stt", "rerank", "ocr", "moderation", "classify", "vision"]],
            "model_parameters": {  # optional
                "temperature": Optional[float],
                "max_tokens": Optional[float],
                "top_k": Optional[float],
                "top_p": Optional[float],
                "frequency_penalty": Optional[float],
                "presence_penalty": Optional[float],
                "num_images": Optional[float],
                "seed": Optional[float],
                "format_": Optional[Literal["url", "b64_json", "text", "json_object"]],
                "dimensions": Optional[str],
                "quality": Optional[str],
                "style": Optional[str],
                "response_format": {  # optional
                    # one of: GetAllPromptsResponseFormat1, GetAllPromptsResponseFormat2, GetAllPromptsResponseFormat3, GetAllPromptsResponseFormat4, GetAllPromptsResponseFormat5, GetAllPromptsResponseFormat6
                    "type": Union[Union[Literal["json_schema"], Literal["json_object"]], Literal["text"]],
                    "display_name": Optional[str],
                    "json_schema": {
                        "name": str,
                        "description": Optional[str],
                        "strict": Optional[bool],
                        "schema_": Dict[str, Any],
                    },
                },
                "cache_control": {  # optional
                    "type": Literal["ephemeral"],
                    "ttl": Optional[Literal["5m", "1h"]],
                },
                "photo_real_version": Optional[Literal["v1", "v2"]],
                "encoding_format": Optional[Literal["float", "base64"]],
                "reasoning_effort": Optional[Literal["none", "disable", "minimal", "low", "medium", "high", "xhigh", "max"]],
                "budget_tokens": Optional[float],
                "verbosity": Optional[Literal["low", "medium", "high"]],
                "thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
            },
            "provider": Optional[Literal["openai", "groq", "cohere", "azure", "aws", "google", "google-ai", "huggingface", "togetherai", "perplexity", "anthropic", "leonardoai", "fal", "nvidia", "jina", "elevenlabs", "litellm", "cerebras", "openailike", "bytedance", "mistral", "deepseek", "moonshotai", "zai", "minimax", "xai", "alibaba", "tensorix", "scaleway", "hcompany", "inception", "particle", "munito", "inceptron", "wafer", "poolside", "tencent", "nebius", "fireworks", "baseten", "reson8", "meta", "greenpt", "liquid", "typesafe", "berget", "cloudflare", "slack", "orq"]],
            "integration_id": Optional[str],
            "version": Optional[str],
            "messages": [{
                "role": Literal["system", "developer", "assistant", "user", "exception", "tool", "prompt", "correction", "expected_output"],
                "content": Union[str, List[GetAllPromptsContent2]],
                "tool_calls": [{  # optional
                    "id": Optional[str],
                    "index": Optional[float],
                    "type": Literal["function"],
                    "function": {
                        "name": str,
                        "arguments": str,
                    },
                }],
                "tool_call_id": Optional[str],
            }],
        },
        "prompt": {
            "name": Optional[str],
            "audio": {  # optional
                "voice": Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer"],
                "format_": Literal["wav", "mp3", "flac", "opus", "pcm16"],
            },
            "frequency_penalty": Optional[float],
            "max_tokens": Optional[int],
            "max_completion_tokens": Optional[int],
            "logprobs": Optional[bool],
            "top_logprobs": Optional[int],
            "n": Optional[int],
            "presence_penalty": Optional[float],
            "response_format": {  # optional
                # one of: GetAllPromptsResponseFormatText, GetAllPromptsResponseFormatJSONObject, GetAllPromptsResponseFormatPromptsJSONSchema
                "type": Union[Union[Literal["text"], Literal["json_object"]], Literal["json_schema"]],
                "json_schema": {
                    "description": Optional[str],
                    "name": str,
                    "schema_": Optional[Any],
                    "strict": Optional[bool],
                },
            },
            "reasoning_effort": Optional[Literal["none", "instant", "minimal", "low", "medium", "high", "xhigh", "max"]],
            "verbosity": Optional[str],
            "seed": Optional[float],
            "stop": Union[str, List[str]],  # optional
            "stream_options": {  # optional
                "include_usage": Optional[bool],
            },
            "thinking": {  # optional
                # one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema, ThinkingConfigBetweenToolsSchema
                "type": Union[Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]], Literal["between_tools"]],
                "budget_tokens": Union[float, Optional[float]],
                "thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
                "display": Optional[Literal["summarized", "omitted", "updates"]],
            },
            "temperature": Optional[float],
            "top_p": Optional[float],
            "top_k": Optional[float],
            "tool_choice": {  # optional
                # one of: GetAllPromptsToolChoice1, GetAllPromptsToolChoice2
                "type": Optional[Literal["function"]],
                "function": {
                    "name": str,
                },
            },
            "parallel_tool_calls": Optional[bool],
            "modalities": List[Literal["text", "audio"]],  # optional
            "guardrails": [{  # optional
                "id": Union[Literal["orq_pii_detection", "orq_secret_detection", "orq_sexual_moderation", "orq_harmful_moderation"], str],
                "execute_on": Literal["input", "output"],
            }],
            "plugins": List[Union[PIIRedactionPlugin, ResponseHealingPlugin, TraceScrubbingPlugin]],  # optional
            "fallback_on_codes": List[int],  # optional
            "fallbacks": [{  # optional
                "model": str,
            }],
            "retry": {  # optional
                "count": Optional[float],
                "on_codes": List[float],  # optional
            },
            "cache": {  # optional
                "ttl": Optional[float],
                "type": Literal["exact_match"],
            },
            "load_balancer": {  # optional
                # one of: GetAllPromptsLoadBalancer1
                "type": Literal["weight_based"],
                "models": [{
                    "model": str,
                    "weight": Optional[float],
                }],
            },
            "timeout": {  # optional
                "call_timeout": float,
            },
            "cache_control": {  # optional
                "type": Literal["ephemeral"],
                "ttl": Optional[Literal["5m", "1h"]],
            },
            "prompt_cache_key": Optional[str],
            "messages": List[Union[GetAllPromptsMessagesSystemMessage, GetAllPromptsMessagesUserMessage, GetAllPromptsMessagesAssistantMessage, GetAllPromptsMessagesToolMessage]],  # optional
            "model": Optional[str],
            "version": Optional[str],
        },
        "metadata": {  # optional
            "use_cases": List[Literal["Agents simulations", "Agents", "API interaction", "Autonomous Agents", "Chatbots", "Classification", "Code understanding", "Code writing", "Conversation", "Documents QA", "Evaluation", "Extraction", "Multi-modal", "Self-checking", "Sentiment analysis", "SQL", "Summarization", "Tagging", "Translation (document)", "Translation (sentences)"]],  # optional
            "language": Optional[Literal["Chinese", "Dutch", "English", "French", "German", "Russian", "Spanish"]],
        },
    }],
    "has_more": bool,
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  object: "list";
  data: {
    id: string;
    type: "prompt";
    owner: string;
    domainId: string;
    created: string;
    updated: string;
    createdById?: string;
    updatedById?: string;
    displayName: string;
    description?: string;
    promptConfig?: {
      stream?: boolean;
      model?: string;
      modelDbId?: string;
      modelType?: "chat" | "completion" | "embedding" | "image" | "tts" | "stt" | "rerank" | "ocr" | "moderation" | "classify" | "vision";
      modelParameters?: {
        temperature?: number;
        maxTokens?: number;
        topK?: number;
        topP?: number;
        frequencyPenalty?: number;
        presencePenalty?: number;
        numImages?: number;
        seed?: number;
        format?: "url" | "b64_json" | "text" | "json_object";
        dimensions?: string;
        quality?: string;
        style?: string;
        responseFormat?: {
          // one of: GetAllPromptsResponseFormat1, GetAllPromptsResponseFormat2, GetAllPromptsResponseFormat3, GetAllPromptsResponseFormat4, GetAllPromptsResponseFormat5, GetAllPromptsResponseFormat6
          type: "json_schema" | "json_object" | "text";
          displayName?: string;
          jsonSchema: {
            name: string;
            description?: string;
            strict?: boolean;
            schema: Record<string, any>;
          };
        };
        cacheControl?: {
          type: "ephemeral";
          ttl?: "5m" | "1h";
        };
        photoRealVersion?: "v1" | "v2";
        encodingFormat?: "float" | "base64";
        reasoningEffort?: "none" | "disable" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
        budgetTokens?: number;
        verbosity?: "low" | "medium" | "high";
        thinkingLevel?: "minimal" | "low" | "medium" | "high";
      };
      provider?: "openai" | "groq" | "cohere" | "azure" | "aws" | "google" | "google-ai" | "huggingface" | "togetherai" | "perplexity" | "anthropic" | "leonardoai" | "fal" | "nvidia" | "jina" | "elevenlabs" | "litellm" | "cerebras" | "openailike" | "bytedance" | "mistral" | "deepseek" | "moonshotai" | "zai" | "minimax" | "xai" | "alibaba" | "tensorix" | "scaleway" | "hcompany" | "inception" | "particle" | "munito" | "inceptron" | "wafer" | "poolside" | "tencent" | "nebius" | "fireworks" | "baseten" | "reson8" | "meta" | "greenpt" | "liquid" | "typesafe" | "berget" | "cloudflare" | "slack" | "orq";
      integrationId?: string;
      version?: string;
      messages: {
        role: "system" | "developer" | "assistant" | "user" | "exception" | "tool" | "prompt" | "correction" | "expected_output";
        content: string | GetAllPromptsContent2[];
        toolCalls?: {
          id?: string;
          index?: number;
          type: "function";
          function: {
            name: string;
            arguments: string;
          };
        }[];
        toolCallId?: string;
      }[];
    };
    prompt: {
      name?: string;
      audio?: {
        voice: "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer";
        format: "wav" | "mp3" | "flac" | "opus" | "pcm16";
      };
      frequencyPenalty?: number;
      maxTokens?: number;
      maxCompletionTokens?: number;
      logprobs?: boolean;
      topLogprobs?: number;
      n?: number;
      presencePenalty?: number;
      responseFormat?: {
        // one of: GetAllPromptsResponseFormatText, GetAllPromptsResponseFormatJSONObject, GetAllPromptsResponseFormatPromptsJSONSchema
        type: "text" | "json_object" | "json_schema";
        jsonSchema: {
          description?: string;
          name: string;
          schema?: any;
          strict?: boolean;
        };
      };
      reasoningEffort?: "none" | "instant" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
      verbosity?: string;
      seed?: number;
      stop?: string | string[];
      streamOptions?: {
        includeUsage?: boolean;
      };
      thinking?: {
        // one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema, ThinkingConfigBetweenToolsSchema
        type: "disabled" | "enabled" | "adaptive" | "between_tools";
        budgetTokens: number;
        thinkingLevel?: "minimal" | "low" | "medium" | "high";
        display?: "summarized" | "omitted" | "updates";
      };
      temperature?: number;
      topP?: number;
      topK?: number;
      toolChoice?: {
        // one of: GetAllPromptsToolChoice1, GetAllPromptsToolChoice2
        type?: "function";
        function: {
          name: string;
        };
      };
      parallelToolCalls?: boolean;
      modalities?: ("text" | "audio")[];
      guardrails?: {
        id: "orq_pii_detection" | "orq_secret_detection" | "orq_sexual_moderation" | "orq_harmful_moderation" | string;
        executeOn: "input" | "output";
      }[];
      plugins?: (PIIRedactionPlugin | ResponseHealingPlugin | TraceScrubbingPlugin)[];
      fallbackOnCodes?: number[];
      fallbacks?: {
        model: string;
      }[];
      retry?: {
        count?: number;
        onCodes?: number[];
      };
      cache?: {
        ttl?: number;
        type: "exact_match";
      };
      loadBalancer?: {
        // one of: GetAllPromptsLoadBalancer1
        type: "weight_based";
        models: {
          model: string;
          weight?: number;
        }[];
      };
      timeout?: {
        callTimeout: number;
      };
      cacheControl?: {
        type: "ephemeral";
        ttl?: "5m" | "1h";
      };
      promptCacheKey?: string;
      messages?: (GetAllPromptsMessagesSystemMessage | GetAllPromptsMessagesUserMessage | GetAllPromptsMessagesAssistantMessage | GetAllPromptsMessagesToolMessage)[];
      model?: string;
      version?: string;
    };
    metadata?: {
      useCases?: ("Agents simulations" | "Agents" | "API interaction" | "Autonomous Agents" | "Chatbots" | "Classification" | "Code understanding" | "Code writing" | "Conversation" | "Documents QA" | "Evaluation" | "Extraction" | "Multi-modal" | "Self-checking" | "Sentiment analysis" | "SQL" | "Summarization" | "Tagging" | "Translation (document)" | "Translation (sentences)")[];
      language?: "Chinese" | "Dutch" | "English" | "French" | "German" | "Russian" | "Spanish";
    };
  }[];
  hasMore: boolean;
}
```

**Variant types**

#### GetAllPromptsContent2

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    # one of: GetAllPrompts21, GetAllPrompts22, GetAllPrompts23
    "type": Union[Union[Literal["text"], Literal["image_url"]], Literal["file"]],
    "text": str,
    "image_url": {
        "id": Optional[str],
        "url": str,
        "detail": Optional[str],
    },
    "file": {
        "file_data": Optional[str],
        "uri": Optional[str],
        "mime_type": Optional[str],
        "filename": Optional[str],
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  // one of: GetAllPrompts21, GetAllPrompts22, GetAllPrompts23
  type: "text" | "image_url" | "file";
  text: string;
  imageUrl: {
    id?: string;
    url: string;
    detail?: string;
  };
  file: {
    fileData?: string;
    uri?: string;
    mimeType?: string;
    filename?: string;
  };
}
```

### Retrieve a Prompt

Retrieves a prompt object

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.prompts.retrieve(id="<id>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.prompts.retrieve({
    id: "<id>",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  id: string;  // required
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "id": str,
    "type": Literal["prompt"],
    "owner": str,
    "domain_id": str,
    "created": str,
    "updated": str,
    "created_by_id": Optional[str],
    "updated_by_id": Optional[str],
    "display_name": str,
    "description": Optional[str],
    "prompt_config": {  # optional
        "stream": Optional[bool],
        "model": Optional[str],
        "model_db_id": Optional[str],
        "model_type": Optional[Literal["chat", "completion", "embedding", "image", "tts", "stt", "rerank", "ocr", "moderation", "classify", "vision"]],
        "model_parameters": {  # optional
            "temperature": Optional[float],
            "max_tokens": Optional[float],
            "top_k": Optional[float],
            "top_p": Optional[float],
            "frequency_penalty": Optional[float],
            "presence_penalty": Optional[float],
            "num_images": Optional[float],
            "seed": Optional[float],
            "format_": Optional[Literal["url", "b64_json", "text", "json_object"]],
            "dimensions": Optional[str],
            "quality": Optional[str],
            "style": Optional[str],
            "response_format": {  # optional
                # one of: GetOnePromptResponseFormat1, GetOnePromptResponseFormat2, GetOnePromptResponseFormat3, GetOnePromptResponseFormat4, GetOnePromptResponseFormat5, GetOnePromptResponseFormat6
                "type": Union[Union[Literal["json_schema"], Literal["json_object"]], Literal["text"]],
                "display_name": Optional[str],
                "json_schema": {
                    "name": str,
                    "description": Optional[str],
                    "strict": Optional[bool],
                    "schema_": Dict[str, Any],
                },
            },
            "cache_control": {  # optional
                "type": Literal["ephemeral"],
                "ttl": Optional[Literal["5m", "1h"]],
            },
            "photo_real_version": Optional[Literal["v1", "v2"]],
            "encoding_format": Optional[Literal["float", "base64"]],
            "reasoning_effort": Optional[Literal["none", "disable", "minimal", "low", "medium", "high", "xhigh", "max"]],
            "budget_tokens": Optional[float],
            "verbosity": Optional[Literal["low", "medium", "high"]],
            "thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
        },
        "provider": Optional[Literal["openai", "groq", "cohere", "azure", "aws", "google", "google-ai", "huggingface", "togetherai", "perplexity", "anthropic", "leonardoai", "fal", "nvidia", "jina", "elevenlabs", "litellm", "cerebras", "openailike", "bytedance", "mistral", "deepseek", "moonshotai", "zai", "minimax", "xai", "alibaba", "tensorix", "scaleway", "hcompany", "inception", "particle", "munito", "inceptron", "wafer", "poolside", "tencent", "nebius", "fireworks", "baseten", "reson8", "meta", "greenpt", "liquid", "typesafe", "berget", "cloudflare", "slack", "orq"]],
        "integration_id": Optional[str],
        "version": Optional[str],
        "messages": [{
            "role": Literal["system", "developer", "assistant", "user", "exception", "tool", "prompt", "correction", "expected_output"],
            "content": Union[str, List[GetOnePromptContent2]],
            "tool_calls": [{  # optional
                "id": Optional[str],
                "index": Optional[float],
                "type": Literal["function"],
                "function": {
                    "name": str,
                    "arguments": str,
                },
            }],
            "tool_call_id": Optional[str],
        }],
    },
    "prompt": {
        "name": Optional[str],
        "audio": {  # optional
            "voice": Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer"],
            "format_": Literal["wav", "mp3", "flac", "opus", "pcm16"],
        },
        "frequency_penalty": Optional[float],
        "max_tokens": Optional[int],
        "max_completion_tokens": Optional[int],
        "logprobs": Optional[bool],
        "top_logprobs": Optional[int],
        "n": Optional[int],
        "presence_penalty": Optional[float],
        "response_format": {  # optional
            # one of: GetOnePromptResponseFormatText, GetOnePromptResponseFormatJSONObject, GetOnePromptResponseFormatPromptsJSONSchema
            "type": Union[Union[Literal["text"], Literal["json_object"]], Literal["json_schema"]],
            "json_schema": {
                "description": Optional[str],
                "name": str,
                "schema_": Optional[Any],
                "strict": Optional[bool],
            },
        },
        "reasoning_effort": Optional[Literal["none", "instant", "minimal", "low", "medium", "high", "xhigh", "max"]],
        "verbosity": Optional[str],
        "seed": Optional[float],
        "stop": Union[str, List[str]],  # optional
        "stream_options": {  # optional
            "include_usage": Optional[bool],
        },
        "thinking": {  # optional
            # one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema, ThinkingConfigBetweenToolsSchema
            "type": Union[Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]], Literal["between_tools"]],
            "budget_tokens": Union[float, Optional[float]],
            "thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
            "display": Optional[Literal["summarized", "omitted", "updates"]],
        },
        "temperature": Optional[float],
        "top_p": Optional[float],
        "top_k": Optional[float],
        "tool_choice": {  # optional
            # one of: GetOnePromptToolChoice1, GetOnePromptToolChoice2
            "type": Optional[Literal["function"]],
            "function": {
                "name": str,
            },
        },
        "parallel_tool_calls": Optional[bool],
        "modalities": List[Literal["text", "audio"]],  # optional
        "guardrails": [{  # optional
            "id": Union[Literal["orq_pii_detection", "orq_secret_detection", "orq_sexual_moderation", "orq_harmful_moderation"], str],
            "execute_on": Literal["input", "output"],
        }],
        "plugins": List[Union[PIIRedactionPlugin, ResponseHealingPlugin, TraceScrubbingPlugin]],  # optional
        "fallback_on_codes": List[int],  # optional
        "fallbacks": [{  # optional
            "model": str,
        }],
        "retry": {  # optional
            "count": Optional[float],
            "on_codes": List[float],  # optional
        },
        "cache": {  # optional
            "ttl": Optional[float],
            "type": Literal["exact_match"],
        },
        "load_balancer": {  # optional
            # one of: GetOnePromptLoadBalancer1
            "type": Literal["weight_based"],
            "models": [{
                "model": str,
                "weight": Optional[float],
            }],
        },
        "timeout": {  # optional
            "call_timeout": float,
        },
        "cache_control": {  # optional
            "type": Literal["ephemeral"],
            "ttl": Optional[Literal["5m", "1h"]],
        },
        "prompt_cache_key": Optional[str],
        "messages": List[Union[GetOnePromptMessagesSystemMessage, GetOnePromptMessagesUserMessage, GetOnePromptMessagesAssistantMessage, GetOnePromptMessagesToolMessage]],  # optional
        "model": Optional[str],
        "version": Optional[str],
    },
    "metadata": {  # optional
        "use_cases": List[Literal["Agents simulations", "Agents", "API interaction", "Autonomous Agents", "Chatbots", "Classification", "Code understanding", "Code writing", "Conversation", "Documents QA", "Evaluation", "Extraction", "Multi-modal", "Self-checking", "Sentiment analysis", "SQL", "Summarization", "Tagging", "Translation (document)", "Translation (sentences)"]],  # optional
        "language": Optional[Literal["Chinese", "Dutch", "English", "French", "German", "Russian", "Spanish"]],
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  id: string;
  type: "prompt";
  owner: string;
  domainId: string;
  created: string;
  updated: string;
  createdById?: string;
  updatedById?: string;
  displayName: string;
  description?: string;
  promptConfig?: {
    stream?: boolean;
    model?: string;
    modelDbId?: string;
    modelType?: "chat" | "completion" | "embedding" | "image" | "tts" | "stt" | "rerank" | "ocr" | "moderation" | "classify" | "vision";
    modelParameters?: {
      temperature?: number;
      maxTokens?: number;
      topK?: number;
      topP?: number;
      frequencyPenalty?: number;
      presencePenalty?: number;
      numImages?: number;
      seed?: number;
      format?: "url" | "b64_json" | "text" | "json_object";
      dimensions?: string;
      quality?: string;
      style?: string;
      responseFormat?: {
        // one of: GetOnePromptResponseFormat1, GetOnePromptResponseFormat2, GetOnePromptResponseFormat3, GetOnePromptResponseFormat4, GetOnePromptResponseFormat5, GetOnePromptResponseFormat6
        type: "json_schema" | "json_object" | "text";
        displayName?: string;
        jsonSchema: {
          name: string;
          description?: string;
          strict?: boolean;
          schema: Record<string, any>;
        };
      };
      cacheControl?: {
        type: "ephemeral";
        ttl?: "5m" | "1h";
      };
      photoRealVersion?: "v1" | "v2";
      encodingFormat?: "float" | "base64";
      reasoningEffort?: "none" | "disable" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
      budgetTokens?: number;
      verbosity?: "low" | "medium" | "high";
      thinkingLevel?: "minimal" | "low" | "medium" | "high";
    };
    provider?: "openai" | "groq" | "cohere" | "azure" | "aws" | "google" | "google-ai" | "huggingface" | "togetherai" | "perplexity" | "anthropic" | "leonardoai" | "fal" | "nvidia" | "jina" | "elevenlabs" | "litellm" | "cerebras" | "openailike" | "bytedance" | "mistral" | "deepseek" | "moonshotai" | "zai" | "minimax" | "xai" | "alibaba" | "tensorix" | "scaleway" | "hcompany" | "inception" | "particle" | "munito" | "inceptron" | "wafer" | "poolside" | "tencent" | "nebius" | "fireworks" | "baseten" | "reson8" | "meta" | "greenpt" | "liquid" | "typesafe" | "berget" | "cloudflare" | "slack" | "orq";
    integrationId?: string;
    version?: string;
    messages: {
      role: "system" | "developer" | "assistant" | "user" | "exception" | "tool" | "prompt" | "correction" | "expected_output";
      content: string | GetOnePromptContent2[];
      toolCalls?: {
        id?: string;
        index?: number;
        type: "function";
        function: {
          name: string;
          arguments: string;
        };
      }[];
      toolCallId?: string;
    }[];
  };
  prompt: {
    name?: string;
    audio?: {
      voice: "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer";
      format: "wav" | "mp3" | "flac" | "opus" | "pcm16";
    };
    frequencyPenalty?: number;
    maxTokens?: number;
    maxCompletionTokens?: number;
    logprobs?: boolean;
    topLogprobs?: number;
    n?: number;
    presencePenalty?: number;
    responseFormat?: {
      // one of: GetOnePromptResponseFormatText, GetOnePromptResponseFormatJSONObject, GetOnePromptResponseFormatPromptsJSONSchema
      type: "text" | "json_object" | "json_schema";
      jsonSchema: {
        description?: string;
        name: string;
        schema?: any;
        strict?: boolean;
      };
    };
    reasoningEffort?: "none" | "instant" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
    verbosity?: string;
    seed?: number;
    stop?: string | string[];
    streamOptions?: {
      includeUsage?: boolean;
    };
    thinking?: {
      // one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema, ThinkingConfigBetweenToolsSchema
      type: "disabled" | "enabled" | "adaptive" | "between_tools";
      budgetTokens: number;
      thinkingLevel?: "minimal" | "low" | "medium" | "high";
      display?: "summarized" | "omitted" | "updates";
    };
    temperature?: number;
    topP?: number;
    topK?: number;
    toolChoice?: {
      // one of: GetOnePromptToolChoice1, GetOnePromptToolChoice2
      type?: "function";
      function: {
        name: string;
      };
    };
    parallelToolCalls?: boolean;
    modalities?: ("text" | "audio")[];
    guardrails?: {
      id: "orq_pii_detection" | "orq_secret_detection" | "orq_sexual_moderation" | "orq_harmful_moderation" | string;
      executeOn: "input" | "output";
    }[];
    plugins?: (PIIRedactionPlugin | ResponseHealingPlugin | TraceScrubbingPlugin)[];
    fallbackOnCodes?: number[];
    fallbacks?: {
      model: string;
    }[];
    retry?: {
      count?: number;
      onCodes?: number[];
    };
    cache?: {
      ttl?: number;
      type: "exact_match";
    };
    loadBalancer?: {
      // one of: GetOnePromptLoadBalancer1
      type: "weight_based";
      models: {
        model: string;
        weight?: number;
      }[];
    };
    timeout?: {
      callTimeout: number;
    };
    cacheControl?: {
      type: "ephemeral";
      ttl?: "5m" | "1h";
    };
    promptCacheKey?: string;
    messages?: (GetOnePromptMessagesSystemMessage | GetOnePromptMessagesUserMessage | GetOnePromptMessagesAssistantMessage | GetOnePromptMessagesToolMessage)[];
    model?: string;
    version?: string;
  };
  metadata?: {
    useCases?: ("Agents simulations" | "Agents" | "API interaction" | "Autonomous Agents" | "Chatbots" | "Classification" | "Code understanding" | "Code writing" | "Conversation" | "Documents QA" | "Evaluation" | "Extraction" | "Multi-modal" | "Self-checking" | "Sentiment analysis" | "SQL" | "Summarization" | "Tagging" | "Translation (document)" | "Translation (sentences)")[];
    language?: "Chinese" | "Dutch" | "English" | "French" | "German" | "Russian" | "Spanish";
  };
}
```

**Variant types**

#### GetOnePromptContent2

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    # one of: GetOnePrompt21, GetOnePrompt22, GetOnePrompt23
    "type": Union[Union[Literal["text"], Literal["image_url"]], Literal["file"]],
    "text": str,
    "image_url": {
        "id": Optional[str],
        "url": str,
        "detail": Optional[str],
    },
    "file": {
        "file_data": Optional[str],
        "uri": Optional[str],
        "mime_type": Optional[str],
        "filename": Optional[str],
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  // one of: GetOnePrompt21, GetOnePrompt22, GetOnePrompt23
  type: "text" | "image_url" | "file";
  text: string;
  imageUrl: {
    id?: string;
    url: string;
    detail?: string;
  };
  file: {
    fileData?: string;
    uri?: string;
    mimeType?: string;
    filename?: string;
  };
}
```

### Delete a Prompt

Delete a prompt and all its versions by ID.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    orq.prompts.delete(id="<id>")

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  await orq.prompts.delete({
    id: "<id>",
  });

}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  id: string;  // required
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.