Prompts
List Prompts
Returns a list of your prompts. The prompts are returned sorted by creation date, with the most recent prompts appearing firstfrom 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)
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();
Show Parameters
Show Parameters
{
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
}
{
limit?: number;
startingAfter?: string;
endingBefore?: string;
}
Show Response
Show Response
{
"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", "inceptron", "wafer", "poolside", "tencent", "nebius", "fireworks", "baseten", "reson8", "meta", "greenpt", "typesafe", "berget", "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", "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
"type": Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]],
"budget_tokens": float,
"thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
},
"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
"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,
}
{
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" | "inceptron" | "wafer" | "poolside" | "tencent" | "nebius" | "fireworks" | "baseten" | "reson8" | "meta" | "greenpt" | "typesafe" | "berget" | "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" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: {
// one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema
type: "disabled" | "enabled" | "adaptive";
budgetTokens: number;
thinkingLevel?: "minimal" | "low" | "medium" | "high";
};
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)[];
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;
}
Show Variant types
Show Variant types
GetAllPromptsContent2
{
# 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],
},
}
{
// 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;
};
}
Create a Prompt
Create a new prompt in the workspace.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.prompts.create(request={
"display_name": "MyPrompt",
"prompt": {
"messages": [
{
"role": "system",
"content": "You are a helpful assistant",
},
{
"role": "user",
"content": "What is the weather today?",
},
],
"model": "openai/gpt-6-astra",
"max_tokens": 1000,
"temperature": 0.7,
},
"path": "Default",
})
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.prompts.create({
displayName: "MyPrompt",
prompt: {
messages: [
{
role: "system",
content: "You are a helpful assistant",
},
{
role: "user",
content: "What is the weather today?",
},
],
model: "openai/gpt-6-astra",
maxTokens: 1000,
temperature: 0.7,
},
path: "Default",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"display_name": str, # required
"description": 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"]],
},
"prompt": { # required
"messages": List[Union[CreatePromptMessagesSystemMessage, CreatePromptMessagesUserMessage, CreatePromptMessagesAssistantMessage, CreatePromptMessagesToolMessage]], # required
"model": Optional[str],
"name": Optional[str],
"audio": { # optional
"voice": Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer"], # required
"format_": Literal["wav", "mp3", "flac", "opus", "pcm16"], # required
},
"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: CreatePromptResponseFormatText, CreatePromptResponseFormatJSONObject, CreatePromptResponseFormatJSONSchema
"type": Union[Union[Literal["text"], Literal["json_object"]], Literal["json_schema"]], # required
"json_schema": { # required (variant-specific)
"description": Optional[str],
"name": str, # required
"schema_": Optional[Any],
"strict": Optional[bool],
},
},
"reasoning_effort": Optional[Literal["none", "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
"type": Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]], # required
"budget_tokens": float, # required (variant-specific)
"thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
},
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": { # optional
# one of: CreatePromptToolChoice1, CreatePromptToolChoice2
"type": Optional[Literal["function"]],
"function": { # required (variant-specific)
"name": str, # required
},
},
"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], # required
"execute_on": Literal["input", "output"], # required
}],
"plugins": List[Union[PIIRedactionPlugin, ResponseHealingPlugin, TraceScrubbingPlugin]], # optional
"fallbacks": [{ # optional
"model": str, # required
}],
"retry": { # optional
"count": Optional[float],
"on_codes": List[float], # optional
},
"cache": { # optional
"ttl": Optional[float],
"type": Literal["exact_match"], # required
},
"load_balancer": { # optional
# one of: CreatePromptLoadBalancer1
"type": Literal["weight_based"], # required
"models": [{ # required
"model": str, # required
"weight": Optional[float],
}],
},
"timeout": { # optional
"call_timeout": float, # required
},
"cache_control": { # optional
"type": Literal["ephemeral"], # required
"ttl": Optional[Literal["5m", "1h"]],
},
"prompt_cache_key": Optional[str],
},
"path": str, # required
}
{
displayName: string; // required
description?: 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";
};
prompt: { // required
messages: (CreatePromptMessagesSystemMessage | CreatePromptMessagesUserMessage | CreatePromptMessagesAssistantMessage | CreatePromptMessagesToolMessage)[]; // required
model?: string;
name?: string;
audio?: {
voice: "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; // required
format: "wav" | "mp3" | "flac" | "opus" | "pcm16"; // required
};
frequencyPenalty?: number;
maxTokens?: number;
maxCompletionTokens?: number;
logprobs?: boolean;
topLogprobs?: number;
n?: number;
presencePenalty?: number;
responseFormat?: {
// one of: CreatePromptResponseFormatText, CreatePromptResponseFormatJSONObject, CreatePromptResponseFormatJSONSchema
type: "text" | "json_object" | "json_schema"; // required
jsonSchema: { // required (variant-specific)
description?: string;
name: string; // required
schema?: any;
strict?: boolean;
};
};
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: {
// one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema
type: "disabled" | "enabled" | "adaptive"; // required
budgetTokens: number; // required (variant-specific)
thinkingLevel?: "minimal" | "low" | "medium" | "high";
};
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: {
// one of: CreatePromptToolChoice1, CreatePromptToolChoice2
type?: "function";
function: { // required (variant-specific)
name: string; // required
};
};
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: "orq_pii_detection" | "orq_secret_detection" | "orq_sexual_moderation" | "orq_harmful_moderation" | string; // required
executeOn: "input" | "output"; // required
}[];
plugins?: (PIIRedactionPlugin | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbacks?: {
model: string; // required
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match"; // required
};
loadBalancer?: {
// one of: CreatePromptLoadBalancer1
type: "weight_based"; // required
models: { // required
model: string; // required
weight?: number;
}[];
};
timeout?: {
callTimeout: number; // required
};
cacheControl?: {
type: "ephemeral"; // required
ttl?: "5m" | "1h";
};
promptCacheKey?: string;
};
path: string; // required
}
Show Response
Show Response
{
"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: CreatePromptResponseFormat1, CreatePromptResponseFormat2, CreatePromptResponseFormat3, CreatePromptResponseFormat4, CreatePromptResponseFormat5, CreatePromptResponseFormat6
"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", "inceptron", "wafer", "poolside", "tencent", "nebius", "fireworks", "baseten", "reson8", "meta", "greenpt", "typesafe", "berget", "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[CreatePromptContentPromptsResponse2]],
"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: CreatePromptResponseFormatPromptsText, CreatePromptResponseFormatPromptsJSONObject, CreatePromptResponseFormatPromptsResponse200JSONSchema
"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", "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
"type": Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]],
"budget_tokens": float,
"thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
},
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": { # optional
# one of: CreatePromptToolChoicePrompts1, CreatePromptToolChoicePrompts2
"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
"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: CreatePromptLoadBalancerPrompts1
"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[CreatePromptMessagesPromptsSystemMessage, CreatePromptMessagesPromptsUserMessage, CreatePromptMessagesPromptsAssistantMessage, CreatePromptMessagesPromptsToolMessage]], # 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"]],
},
}
{
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: CreatePromptResponseFormat1, CreatePromptResponseFormat2, CreatePromptResponseFormat3, CreatePromptResponseFormat4, CreatePromptResponseFormat5, CreatePromptResponseFormat6
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" | "inceptron" | "wafer" | "poolside" | "tencent" | "nebius" | "fireworks" | "baseten" | "reson8" | "meta" | "greenpt" | "typesafe" | "berget" | "slack" | "orq";
integrationId?: string;
version?: string;
messages: {
role: "system" | "developer" | "assistant" | "user" | "exception" | "tool" | "prompt" | "correction" | "expected_output";
content: string | CreatePromptContentPromptsResponse2[];
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: CreatePromptResponseFormatPromptsText, CreatePromptResponseFormatPromptsJSONObject, CreatePromptResponseFormatPromptsResponse200JSONSchema
type: "text" | "json_object" | "json_schema";
jsonSchema: {
description?: string;
name: string;
schema?: any;
strict?: boolean;
};
};
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: {
// one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema
type: "disabled" | "enabled" | "adaptive";
budgetTokens: number;
thinkingLevel?: "minimal" | "low" | "medium" | "high";
};
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: {
// one of: CreatePromptToolChoicePrompts1, CreatePromptToolChoicePrompts2
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)[];
fallbacks?: {
model: string;
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: {
// one of: CreatePromptLoadBalancerPrompts1
type: "weight_based";
models: {
model: string;
weight?: number;
}[];
};
timeout?: {
callTimeout: number;
};
cacheControl?: {
type: "ephemeral";
ttl?: "5m" | "1h";
};
promptCacheKey?: string;
messages?: (CreatePromptMessagesPromptsSystemMessage | CreatePromptMessagesPromptsUserMessage | CreatePromptMessagesPromptsAssistantMessage | CreatePromptMessagesPromptsToolMessage)[];
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";
};
}
Show Variant types
Show Variant types
CreatePromptContentPromptsResponse2
{
# one of: CreatePrompt21, CreatePrompt22, CreatePrompt23
"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],
},
}
{
// one of: CreatePrompt21, CreatePrompt22, CreatePrompt23
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 objectfrom 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)
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();
Show Parameters
Show Parameters
{
"id": str, # required
}
{
id: string; // required
}
Show Response
Show Response
{
"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", "inceptron", "wafer", "poolside", "tencent", "nebius", "fireworks", "baseten", "reson8", "meta", "greenpt", "typesafe", "berget", "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", "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
"type": Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]],
"budget_tokens": float,
"thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
},
"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
"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"]],
},
}
{
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" | "inceptron" | "wafer" | "poolside" | "tencent" | "nebius" | "fireworks" | "baseten" | "reson8" | "meta" | "greenpt" | "typesafe" | "berget" | "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" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: {
// one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema
type: "disabled" | "enabled" | "adaptive";
budgetTokens: number;
thinkingLevel?: "minimal" | "low" | "medium" | "high";
};
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)[];
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";
};
}
Show Variant types
Show Variant types
GetOnePromptContent2
{
# 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],
},
}
{
// 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;
};
}
Update a Prompt
Update a prompt by ID with the provided fields.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.prompts.update(id="<id>", prompt={
"messages": [
{
"role": "system",
"content": "You are a helpful assistant",
},
{
"role": "user",
"content": "Hello!",
},
],
"model": "anthropic/claude-sonnet-5",
"temperature": 0.5,
}, path="Default")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.prompts.update({
id: "<id>",
requestBody: {
prompt: {
messages: [
{
role: "system",
content: "You are a helpful assistant",
},
{
role: "user",
content: "Hello!",
},
],
model: "anthropic/claude-sonnet-5",
temperature: 0.5,
},
path: "Default",
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"id": str, # required
"owner": Optional[str],
"domain_id": Optional[str],
"created": Optional[str],
"updated": Optional[str],
"created_by_id": Optional[str],
"updated_by_id": Optional[str],
"display_name": Optional[str],
"description": Optional[str],
"prompt": { # optional
"messages": List[Union[UpdatePromptMessagesSystemMessage, UpdatePromptMessagesUserMessage, UpdatePromptMessagesAssistantMessage, UpdatePromptMessagesToolMessage]], # optional
"model": Optional[str],
"name": Optional[str],
"audio": { # optional
"voice": Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer"], # required
"format_": Literal["wav", "mp3", "flac", "opus", "pcm16"], # required
},
"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: UpdatePromptResponseFormatText, UpdatePromptResponseFormatJSONObject, UpdatePromptResponseFormatJSONSchema
"type": Union[Union[Literal["text"], Literal["json_object"]], Literal["json_schema"]], # required
"json_schema": { # required (variant-specific)
"description": Optional[str],
"name": str, # required
"schema_": Optional[Any],
"strict": Optional[bool],
},
},
"reasoning_effort": Optional[Literal["none", "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
"type": Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]], # required
"budget_tokens": float, # required (variant-specific)
"thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
},
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": { # optional
# one of: UpdatePromptToolChoice1, UpdatePromptToolChoice2
"type": Optional[Literal["function"]],
"function": { # required (variant-specific)
"name": str, # required
},
},
"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], # required
"execute_on": Literal["input", "output"], # required
}],
"plugins": List[Union[PIIRedactionPlugin, ResponseHealingPlugin, TraceScrubbingPlugin]], # optional
"fallbacks": [{ # optional
"model": str, # required
}],
"retry": { # optional
"count": Optional[float],
"on_codes": List[float], # optional
},
"cache": { # optional
"ttl": Optional[float],
"type": Literal["exact_match"], # required
},
"load_balancer": { # optional
# one of: UpdatePromptLoadBalancer1
"type": Literal["weight_based"], # required
"models": [{ # required
"model": str, # required
"weight": Optional[float],
}],
},
"timeout": { # optional
"call_timeout": float, # required
},
"cache_control": { # optional
"type": Literal["ephemeral"], # required
"ttl": Optional[Literal["5m", "1h"]],
},
"prompt_cache_key": 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"]],
},
"path": Optional[str],
}
{
id: string; // required
requestBody?: {
owner?: string;
domainId?: string;
created?: string;
updated?: string;
createdById?: string;
updatedById?: string;
displayName?: string;
description?: string;
prompt?: {
messages?: (UpdatePromptMessagesSystemMessage | UpdatePromptMessagesUserMessage | UpdatePromptMessagesAssistantMessage | UpdatePromptMessagesToolMessage)[];
model?: string;
name?: string;
audio?: {
voice: "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; // required
format: "wav" | "mp3" | "flac" | "opus" | "pcm16"; // required
};
frequencyPenalty?: number;
maxTokens?: number;
maxCompletionTokens?: number;
logprobs?: boolean;
topLogprobs?: number;
n?: number;
presencePenalty?: number;
responseFormat?: {
// one of: UpdatePromptResponseFormatText, UpdatePromptResponseFormatJSONObject, UpdatePromptResponseFormatJSONSchema
type: "text" | "json_object" | "json_schema"; // required
jsonSchema: { // required (variant-specific)
description?: string;
name: string; // required
schema?: any;
strict?: boolean;
};
};
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: {
// one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema
type: "disabled" | "enabled" | "adaptive"; // required
budgetTokens: number; // required (variant-specific)
thinkingLevel?: "minimal" | "low" | "medium" | "high";
};
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: {
// one of: UpdatePromptToolChoice1, UpdatePromptToolChoice2
type?: "function";
function: { // required (variant-specific)
name: string; // required
};
};
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: "orq_pii_detection" | "orq_secret_detection" | "orq_sexual_moderation" | "orq_harmful_moderation" | string; // required
executeOn: "input" | "output"; // required
}[];
plugins?: (PIIRedactionPlugin | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbacks?: {
model: string; // required
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match"; // required
};
loadBalancer?: {
// one of: UpdatePromptLoadBalancer1
type: "weight_based"; // required
models: { // required
model: string; // required
weight?: number;
}[];
};
timeout?: {
callTimeout: number; // required
};
cacheControl?: {
type: "ephemeral"; // required
ttl?: "5m" | "1h";
};
promptCacheKey?: 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";
};
path?: string;
};
}
Show Response
Show Response
{
"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: UpdatePromptResponseFormat1, UpdatePromptResponseFormat2, UpdatePromptResponseFormat3, UpdatePromptResponseFormat4, UpdatePromptResponseFormat5, UpdatePromptResponseFormat6
"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", "inceptron", "wafer", "poolside", "tencent", "nebius", "fireworks", "baseten", "reson8", "meta", "greenpt", "typesafe", "berget", "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[UpdatePromptContentPromptsResponse2]],
"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: UpdatePromptResponseFormatPromptsText, UpdatePromptResponseFormatPromptsJSONObject, UpdatePromptResponseFormatPromptsResponse200JSONSchema
"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", "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
"type": Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]],
"budget_tokens": float,
"thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
},
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": { # optional
# one of: UpdatePromptToolChoicePrompts1, UpdatePromptToolChoicePrompts2
"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
"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: UpdatePromptLoadBalancerPrompts1
"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[UpdatePromptMessagesPromptsSystemMessage, UpdatePromptMessagesPromptsUserMessage, UpdatePromptMessagesPromptsAssistantMessage, UpdatePromptMessagesPromptsToolMessage]], # 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"]],
},
}
{
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: UpdatePromptResponseFormat1, UpdatePromptResponseFormat2, UpdatePromptResponseFormat3, UpdatePromptResponseFormat4, UpdatePromptResponseFormat5, UpdatePromptResponseFormat6
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" | "inceptron" | "wafer" | "poolside" | "tencent" | "nebius" | "fireworks" | "baseten" | "reson8" | "meta" | "greenpt" | "typesafe" | "berget" | "slack" | "orq";
integrationId?: string;
version?: string;
messages: {
role: "system" | "developer" | "assistant" | "user" | "exception" | "tool" | "prompt" | "correction" | "expected_output";
content: string | UpdatePromptContentPromptsResponse2[];
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: UpdatePromptResponseFormatPromptsText, UpdatePromptResponseFormatPromptsJSONObject, UpdatePromptResponseFormatPromptsResponse200JSONSchema
type: "text" | "json_object" | "json_schema";
jsonSchema: {
description?: string;
name: string;
schema?: any;
strict?: boolean;
};
};
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: {
// one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema
type: "disabled" | "enabled" | "adaptive";
budgetTokens: number;
thinkingLevel?: "minimal" | "low" | "medium" | "high";
};
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: {
// one of: UpdatePromptToolChoicePrompts1, UpdatePromptToolChoicePrompts2
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)[];
fallbacks?: {
model: string;
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: {
// one of: UpdatePromptLoadBalancerPrompts1
type: "weight_based";
models: {
model: string;
weight?: number;
}[];
};
timeout?: {
callTimeout: number;
};
cacheControl?: {
type: "ephemeral";
ttl?: "5m" | "1h";
};
promptCacheKey?: string;
messages?: (UpdatePromptMessagesPromptsSystemMessage | UpdatePromptMessagesPromptsUserMessage | UpdatePromptMessagesPromptsAssistantMessage | UpdatePromptMessagesPromptsToolMessage)[];
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";
};
}
Show Variant types
Show Variant types
UpdatePromptContentPromptsResponse2
{
# one of: UpdatePrompt21, UpdatePrompt22, UpdatePrompt23
"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],
},
}
{
// one of: UpdatePrompt21, UpdatePrompt22, UpdatePrompt23
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.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
orq.prompts.delete(id="<id>")
# Use the SDK ...
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();
Show Parameters
Show Parameters
{
"id": str, # required
}
{
id: string; // required
}
List Versions
Returns a list of your prompt versions. The prompt versions are returned sorted by creation date, with the most recent prompt versions appearing firstfrom orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.prompts.list_versions(prompt_id="<id>", limit=10)
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.prompts.listVersions({
promptId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"prompt_id": str, # required
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
}
{
promptId: string; // required
limit?: number;
startingAfter?: string;
endingBefore?: string;
}
Show Response
Show Response
{
"object": Literal["list"],
"data": [{
"id": str,
"created_by_id": Optional[str],
"updated_by_id": Optional[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: ListPromptVersionsResponseFormat1, ListPromptVersionsResponseFormat2, ListPromptVersionsResponseFormat3, ListPromptVersionsResponseFormat4, ListPromptVersionsResponseFormat5, ListPromptVersionsResponseFormat6
"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", "inceptron", "wafer", "poolside", "tencent", "nebius", "fireworks", "baseten", "reson8", "meta", "greenpt", "typesafe", "berget", "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[ListPromptVersionsContent2]],
"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: ListPromptVersionsResponseFormatText, ListPromptVersionsResponseFormatJSONObject, ListPromptVersionsResponseFormatPromptsJSONSchema
"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", "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
"type": Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]],
"budget_tokens": float,
"thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
},
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": { # optional
# one of: ListPromptVersionsToolChoice1, ListPromptVersionsToolChoice2
"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
"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: ListPromptVersionsLoadBalancer1
"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[ListPromptVersionsMessagesSystemMessage, ListPromptVersionsMessagesUserMessage, ListPromptVersionsMessagesAssistantMessage, ListPromptVersionsMessagesToolMessage]], # 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"]],
},
"timestamp": str,
}],
"has_more": bool,
}
{
object: "list";
data: {
id: string;
createdById?: string;
updatedById?: 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: ListPromptVersionsResponseFormat1, ListPromptVersionsResponseFormat2, ListPromptVersionsResponseFormat3, ListPromptVersionsResponseFormat4, ListPromptVersionsResponseFormat5, ListPromptVersionsResponseFormat6
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" | "inceptron" | "wafer" | "poolside" | "tencent" | "nebius" | "fireworks" | "baseten" | "reson8" | "meta" | "greenpt" | "typesafe" | "berget" | "slack" | "orq";
integrationId?: string;
version?: string;
messages: {
role: "system" | "developer" | "assistant" | "user" | "exception" | "tool" | "prompt" | "correction" | "expected_output";
content: string | ListPromptVersionsContent2[];
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: ListPromptVersionsResponseFormatText, ListPromptVersionsResponseFormatJSONObject, ListPromptVersionsResponseFormatPromptsJSONSchema
type: "text" | "json_object" | "json_schema";
jsonSchema: {
description?: string;
name: string;
schema?: any;
strict?: boolean;
};
};
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: {
// one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema
type: "disabled" | "enabled" | "adaptive";
budgetTokens: number;
thinkingLevel?: "minimal" | "low" | "medium" | "high";
};
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: {
// one of: ListPromptVersionsToolChoice1, ListPromptVersionsToolChoice2
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)[];
fallbacks?: {
model: string;
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: {
// one of: ListPromptVersionsLoadBalancer1
type: "weight_based";
models: {
model: string;
weight?: number;
}[];
};
timeout?: {
callTimeout: number;
};
cacheControl?: {
type: "ephemeral";
ttl?: "5m" | "1h";
};
promptCacheKey?: string;
messages?: (ListPromptVersionsMessagesSystemMessage | ListPromptVersionsMessagesUserMessage | ListPromptVersionsMessagesAssistantMessage | ListPromptVersionsMessagesToolMessage)[];
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";
};
timestamp: string;
}[];
hasMore: boolean;
}
Show Variant types
Show Variant types
ListPromptVersionsContent2
{
# one of: ListPromptVersions21, ListPromptVersions22, ListPromptVersions23
"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],
},
}
{
// one of: ListPromptVersions21, ListPromptVersions22, ListPromptVersions23
type: "text" | "image_url" | "file";
text: string;
imageUrl: {
id?: string;
url: string;
detail?: string;
};
file: {
fileData?: string;
uri?: string;
mimeType?: string;
filename?: string;
};
}
Get Version
Retrieves a specific version of a prompt by its ID and version ID.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.prompts.get_version(prompt_id="<id>", version_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.prompts.getVersion({
promptId: "<id>",
versionId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"prompt_id": str, # required
"version_id": str, # required
}
{
promptId: string; // required
versionId: string; // required
}
Show Response
Show Response
{
"id": str,
"created_by_id": Optional[str],
"updated_by_id": Optional[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: GetPromptVersionResponseFormat1, GetPromptVersionResponseFormat2, GetPromptVersionResponseFormat3, GetPromptVersionResponseFormat4, GetPromptVersionResponseFormat5, GetPromptVersionResponseFormat6
"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", "inceptron", "wafer", "poolside", "tencent", "nebius", "fireworks", "baseten", "reson8", "meta", "greenpt", "typesafe", "berget", "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[GetPromptVersionContent2]],
"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: GetPromptVersionResponseFormatText, GetPromptVersionResponseFormatJSONObject, GetPromptVersionResponseFormatPromptsJSONSchema
"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", "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
"type": Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]],
"budget_tokens": float,
"thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
},
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": { # optional
# one of: GetPromptVersionToolChoice1, GetPromptVersionToolChoice2
"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
"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: GetPromptVersionLoadBalancer1
"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[GetPromptVersionMessagesSystemMessage, GetPromptVersionMessagesUserMessage, GetPromptVersionMessagesAssistantMessage, GetPromptVersionMessagesToolMessage]], # 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"]],
},
"timestamp": str,
}
{
id: string;
createdById?: string;
updatedById?: 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: GetPromptVersionResponseFormat1, GetPromptVersionResponseFormat2, GetPromptVersionResponseFormat3, GetPromptVersionResponseFormat4, GetPromptVersionResponseFormat5, GetPromptVersionResponseFormat6
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" | "inceptron" | "wafer" | "poolside" | "tencent" | "nebius" | "fireworks" | "baseten" | "reson8" | "meta" | "greenpt" | "typesafe" | "berget" | "slack" | "orq";
integrationId?: string;
version?: string;
messages: {
role: "system" | "developer" | "assistant" | "user" | "exception" | "tool" | "prompt" | "correction" | "expected_output";
content: string | GetPromptVersionContent2[];
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: GetPromptVersionResponseFormatText, GetPromptVersionResponseFormatJSONObject, GetPromptVersionResponseFormatPromptsJSONSchema
type: "text" | "json_object" | "json_schema";
jsonSchema: {
description?: string;
name: string;
schema?: any;
strict?: boolean;
};
};
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: {
// one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema
type: "disabled" | "enabled" | "adaptive";
budgetTokens: number;
thinkingLevel?: "minimal" | "low" | "medium" | "high";
};
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: {
// one of: GetPromptVersionToolChoice1, GetPromptVersionToolChoice2
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)[];
fallbacks?: {
model: string;
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: {
// one of: GetPromptVersionLoadBalancer1
type: "weight_based";
models: {
model: string;
weight?: number;
}[];
};
timeout?: {
callTimeout: number;
};
cacheControl?: {
type: "ephemeral";
ttl?: "5m" | "1h";
};
promptCacheKey?: string;
messages?: (GetPromptVersionMessagesSystemMessage | GetPromptVersionMessagesUserMessage | GetPromptVersionMessagesAssistantMessage | GetPromptVersionMessagesToolMessage)[];
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";
};
timestamp: string;
}
Show Variant types
Show Variant types
GetPromptVersionContent2
{
# one of: GetPromptVersion21, GetPromptVersion22, GetPromptVersion23
"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],
},
}
{
// one of: GetPromptVersion21, GetPromptVersion22, GetPromptVersion23
type: "text" | "image_url" | "file";
text: string;
imageUrl: {
id?: string;
url: string;
detail?: string;
};
file: {
fileData?: string;
uri?: string;
mimeType?: string;
filename?: string;
};
}