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", "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": Union[GetAllPromptsResponseFormat1, GetAllPromptsResponseFormat2, GetAllPromptsResponseFormat3, GetAllPromptsResponseFormat4, GetAllPromptsResponseFormat5, GetAllPromptsResponseFormat6], # optional
"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", "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": Union[GetAllPromptsResponseFormatText, GetAllPromptsResponseFormatJSONObject, GetAllPromptsResponseFormatPromptsJSONSchema], # optional
"reasoning_effort": Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]],
"verbosity": Optional[str],
"seed": Optional[float],
"stop": Union[str, List[str]], # optional
"stream_options": { # optional
"include_usage": Optional[bool],
},
"thinking": Union[ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema], # optional
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": Union[GetAllPromptsToolChoice1, GetAllPromptsToolChoice2], # optional
"parallel_tool_calls": Optional[bool],
"modalities": List[Literal["text", "audio"]], # optional
"guardrails": [{ # optional
"id": Union[GetAllPromptsID1, str],
"execute_on": Literal["input", "output"],
}],
"plugins": List[Union[PIIRedactionPluginAuto, PIIRedactionPluginEn, PIIRedactionPluginNl, 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": Union[GetAllPromptsLoadBalancer1], # optional
"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" | "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?: GetAllPromptsResponseFormat1 | GetAllPromptsResponseFormat2 | GetAllPromptsResponseFormat3 | GetAllPromptsResponseFormat4 | GetAllPromptsResponseFormat5 | GetAllPromptsResponseFormat6;
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" | "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?: GetAllPromptsResponseFormatText | GetAllPromptsResponseFormatJSONObject | GetAllPromptsResponseFormatPromptsJSONSchema;
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: ThinkingConfigDisabledSchema | ThinkingConfigEnabledSchema | ThinkingConfigAdaptiveSchema;
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: GetAllPromptsToolChoice1 | GetAllPromptsToolChoice2;
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: GetAllPromptsId1 | string;
executeOn: "input" | "output";
}[];
plugins?: (PIIRedactionPluginAuto | PIIRedactionPluginEn | PIIRedactionPluginNl | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbacks?: {
model: string;
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: GetAllPromptsLoadBalancer1;
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;
}
Create a Prompt
Create a promptfrom 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": "Raymundo83",
"prompt": {
"messages": [
{
"role": "system",
"content": "You are a helpful assistant",
},
{
"role": "user",
"content": "What is the weather today?",
},
],
"model": "openai/gpt-4o",
"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: "Raymundo83",
prompt: {
messages: [
{
role: "system",
content: "You are a helpful assistant",
},
{
role: "user",
content: "What is the weather today?",
},
],
model: "openai/gpt-4o",
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": Union[CreatePromptResponseFormatText, CreatePromptResponseFormatJSONObject, CreatePromptResponseFormatJSONSchema], # optional
"reasoning_effort": Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]],
"verbosity": Optional[str],
"seed": Optional[float],
"stop": Union[str, List[str]], # optional
"stream_options": { # optional
"include_usage": Optional[bool],
},
"thinking": Union[ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema], # optional
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": Union[CreatePromptToolChoice1, CreatePromptToolChoice2], # optional
"parallel_tool_calls": Optional[bool],
"modalities": List[Literal["text", "audio"]], # optional
"guardrails": [{ # optional
"id": Union[CreatePromptID1, str], # required
"execute_on": Literal["input", "output"], # required
}],
"plugins": List[Union[PIIRedactionPluginAuto, PIIRedactionPluginEn, PIIRedactionPluginNl, 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": Union[CreatePromptLoadBalancer1], # optional
"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?: CreatePromptResponseFormatText | CreatePromptResponseFormatJSONObject | CreatePromptResponseFormatJSONSchema;
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: ThinkingConfigDisabledSchema | ThinkingConfigEnabledSchema | ThinkingConfigAdaptiveSchema;
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: CreatePromptToolChoice1 | CreatePromptToolChoice2;
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: CreatePromptId1 | string; // required
executeOn: "input" | "output"; // required
}[];
plugins?: (PIIRedactionPluginAuto | PIIRedactionPluginEn | PIIRedactionPluginNl | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbacks?: {
model: string; // required
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match"; // required
};
loadBalancer?: CreatePromptLoadBalancer1;
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", "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": Union[CreatePromptResponseFormat1, CreatePromptResponseFormat2, CreatePromptResponseFormat3, CreatePromptResponseFormat4, CreatePromptResponseFormat5, CreatePromptResponseFormat6], # optional
"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", "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": Union[CreatePromptResponseFormatPromptsText, CreatePromptResponseFormatPromptsJSONObject, CreatePromptResponseFormatPromptsResponse200JSONSchema], # optional
"reasoning_effort": Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]],
"verbosity": Optional[str],
"seed": Optional[float],
"stop": Union[str, List[str]], # optional
"stream_options": { # optional
"include_usage": Optional[bool],
},
"thinking": Union[ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema], # optional
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": Union[CreatePromptToolChoicePrompts1, CreatePromptToolChoicePrompts2], # optional
"parallel_tool_calls": Optional[bool],
"modalities": List[Literal["text", "audio"]], # optional
"guardrails": [{ # optional
"id": Union[CreatePromptIDPrompts1, str],
"execute_on": Literal["input", "output"],
}],
"plugins": List[Union[PIIRedactionPluginAuto, PIIRedactionPluginEn, PIIRedactionPluginNl, 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": Union[CreatePromptLoadBalancerPrompts1], # optional
"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" | "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?: CreatePromptResponseFormat1 | CreatePromptResponseFormat2 | CreatePromptResponseFormat3 | CreatePromptResponseFormat4 | CreatePromptResponseFormat5 | CreatePromptResponseFormat6;
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" | "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?: CreatePromptResponseFormatPromptsText | CreatePromptResponseFormatPromptsJSONObject | CreatePromptResponseFormatPromptsResponse200JSONSchema;
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: ThinkingConfigDisabledSchema | ThinkingConfigEnabledSchema | ThinkingConfigAdaptiveSchema;
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: CreatePromptToolChoicePrompts1 | CreatePromptToolChoicePrompts2;
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: CreatePromptIdPrompts1 | string;
executeOn: "input" | "output";
}[];
plugins?: (PIIRedactionPluginAuto | PIIRedactionPluginEn | PIIRedactionPluginNl | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbacks?: {
model: string;
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: CreatePromptLoadBalancerPrompts1;
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";
};
}
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", "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": Union[GetOnePromptResponseFormat1, GetOnePromptResponseFormat2, GetOnePromptResponseFormat3, GetOnePromptResponseFormat4, GetOnePromptResponseFormat5, GetOnePromptResponseFormat6], # optional
"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", "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": Union[GetOnePromptResponseFormatText, GetOnePromptResponseFormatJSONObject, GetOnePromptResponseFormatPromptsJSONSchema], # optional
"reasoning_effort": Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]],
"verbosity": Optional[str],
"seed": Optional[float],
"stop": Union[str, List[str]], # optional
"stream_options": { # optional
"include_usage": Optional[bool],
},
"thinking": Union[ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema], # optional
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": Union[GetOnePromptToolChoice1, GetOnePromptToolChoice2], # optional
"parallel_tool_calls": Optional[bool],
"modalities": List[Literal["text", "audio"]], # optional
"guardrails": [{ # optional
"id": Union[GetOnePromptID1, str],
"execute_on": Literal["input", "output"],
}],
"plugins": List[Union[PIIRedactionPluginAuto, PIIRedactionPluginEn, PIIRedactionPluginNl, 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": Union[GetOnePromptLoadBalancer1], # optional
"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" | "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?: GetOnePromptResponseFormat1 | GetOnePromptResponseFormat2 | GetOnePromptResponseFormat3 | GetOnePromptResponseFormat4 | GetOnePromptResponseFormat5 | GetOnePromptResponseFormat6;
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" | "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?: GetOnePromptResponseFormatText | GetOnePromptResponseFormatJSONObject | GetOnePromptResponseFormatPromptsJSONSchema;
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: ThinkingConfigDisabledSchema | ThinkingConfigEnabledSchema | ThinkingConfigAdaptiveSchema;
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: GetOnePromptToolChoice1 | GetOnePromptToolChoice2;
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: GetOnePromptId1 | string;
executeOn: "input" | "output";
}[];
plugins?: (PIIRedactionPluginAuto | PIIRedactionPluginEn | PIIRedactionPluginNl | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbacks?: {
model: string;
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: GetOnePromptLoadBalancer1;
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";
};
}
Update a Prompt
Update a promptfrom 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-3-5-sonnet-20241022",
"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-3-5-sonnet-20241022",
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": Union[UpdatePromptResponseFormatText, UpdatePromptResponseFormatJSONObject, UpdatePromptResponseFormatJSONSchema], # optional
"reasoning_effort": Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]],
"verbosity": Optional[str],
"seed": Optional[float],
"stop": Union[str, List[str]], # optional
"stream_options": { # optional
"include_usage": Optional[bool],
},
"thinking": Union[ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema], # optional
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": Union[UpdatePromptToolChoice1, UpdatePromptToolChoice2], # optional
"parallel_tool_calls": Optional[bool],
"modalities": List[Literal["text", "audio"]], # optional
"guardrails": [{ # optional
"id": Union[UpdatePromptID1, str], # required
"execute_on": Literal["input", "output"], # required
}],
"plugins": List[Union[PIIRedactionPluginAuto, PIIRedactionPluginEn, PIIRedactionPluginNl, 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": Union[UpdatePromptLoadBalancer1], # optional
"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?: UpdatePromptResponseFormatText | UpdatePromptResponseFormatJSONObject | UpdatePromptResponseFormatJSONSchema;
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: ThinkingConfigDisabledSchema | ThinkingConfigEnabledSchema | ThinkingConfigAdaptiveSchema;
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: UpdatePromptToolChoice1 | UpdatePromptToolChoice2;
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: UpdatePromptId1 | string; // required
executeOn: "input" | "output"; // required
}[];
plugins?: (PIIRedactionPluginAuto | PIIRedactionPluginEn | PIIRedactionPluginNl | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbacks?: {
model: string; // required
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match"; // required
};
loadBalancer?: UpdatePromptLoadBalancer1;
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", "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": Union[UpdatePromptResponseFormat1, UpdatePromptResponseFormat2, UpdatePromptResponseFormat3, UpdatePromptResponseFormat4, UpdatePromptResponseFormat5, UpdatePromptResponseFormat6], # optional
"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", "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": Union[UpdatePromptResponseFormatPromptsText, UpdatePromptResponseFormatPromptsJSONObject, UpdatePromptResponseFormatPromptsResponse200JSONSchema], # optional
"reasoning_effort": Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]],
"verbosity": Optional[str],
"seed": Optional[float],
"stop": Union[str, List[str]], # optional
"stream_options": { # optional
"include_usage": Optional[bool],
},
"thinking": Union[ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema], # optional
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": Union[UpdatePromptToolChoicePrompts1, UpdatePromptToolChoicePrompts2], # optional
"parallel_tool_calls": Optional[bool],
"modalities": List[Literal["text", "audio"]], # optional
"guardrails": [{ # optional
"id": Union[UpdatePromptIDPrompts1, str],
"execute_on": Literal["input", "output"],
}],
"plugins": List[Union[PIIRedactionPluginAuto, PIIRedactionPluginEn, PIIRedactionPluginNl, 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": Union[UpdatePromptLoadBalancerPrompts1], # optional
"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" | "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?: UpdatePromptResponseFormat1 | UpdatePromptResponseFormat2 | UpdatePromptResponseFormat3 | UpdatePromptResponseFormat4 | UpdatePromptResponseFormat5 | UpdatePromptResponseFormat6;
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" | "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?: UpdatePromptResponseFormatPromptsText | UpdatePromptResponseFormatPromptsJSONObject | UpdatePromptResponseFormatPromptsResponse200JSONSchema;
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: ThinkingConfigDisabledSchema | ThinkingConfigEnabledSchema | ThinkingConfigAdaptiveSchema;
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: UpdatePromptToolChoicePrompts1 | UpdatePromptToolChoicePrompts2;
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: UpdatePromptIdPrompts1 | string;
executeOn: "input" | "output";
}[];
plugins?: (PIIRedactionPluginAuto | PIIRedactionPluginEn | PIIRedactionPluginNl | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbacks?: {
model: string;
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: UpdatePromptLoadBalancerPrompts1;
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";
};
}
Delete a Prompt
Delete a promptfrom 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", "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": Union[ListPromptVersionsResponseFormat1, ListPromptVersionsResponseFormat2, ListPromptVersionsResponseFormat3, ListPromptVersionsResponseFormat4, ListPromptVersionsResponseFormat5, ListPromptVersionsResponseFormat6], # optional
"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", "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": Union[ListPromptVersionsResponseFormatText, ListPromptVersionsResponseFormatJSONObject, ListPromptVersionsResponseFormatPromptsJSONSchema], # optional
"reasoning_effort": Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]],
"verbosity": Optional[str],
"seed": Optional[float],
"stop": Union[str, List[str]], # optional
"stream_options": { # optional
"include_usage": Optional[bool],
},
"thinking": Union[ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema], # optional
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": Union[ListPromptVersionsToolChoice1, ListPromptVersionsToolChoice2], # optional
"parallel_tool_calls": Optional[bool],
"modalities": List[Literal["text", "audio"]], # optional
"guardrails": [{ # optional
"id": Union[ListPromptVersionsID1, str],
"execute_on": Literal["input", "output"],
}],
"plugins": List[Union[PIIRedactionPluginAuto, PIIRedactionPluginEn, PIIRedactionPluginNl, 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": Union[ListPromptVersionsLoadBalancer1], # optional
"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" | "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?: ListPromptVersionsResponseFormat1 | ListPromptVersionsResponseFormat2 | ListPromptVersionsResponseFormat3 | ListPromptVersionsResponseFormat4 | ListPromptVersionsResponseFormat5 | ListPromptVersionsResponseFormat6;
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" | "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?: ListPromptVersionsResponseFormatText | ListPromptVersionsResponseFormatJSONObject | ListPromptVersionsResponseFormatPromptsJSONSchema;
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: ThinkingConfigDisabledSchema | ThinkingConfigEnabledSchema | ThinkingConfigAdaptiveSchema;
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: ListPromptVersionsToolChoice1 | ListPromptVersionsToolChoice2;
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: ListPromptVersionsId1 | string;
executeOn: "input" | "output";
}[];
plugins?: (PIIRedactionPluginAuto | PIIRedactionPluginEn | PIIRedactionPluginNl | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbacks?: {
model: string;
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: ListPromptVersionsLoadBalancer1;
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;
}
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", "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": Union[GetPromptVersionResponseFormat1, GetPromptVersionResponseFormat2, GetPromptVersionResponseFormat3, GetPromptVersionResponseFormat4, GetPromptVersionResponseFormat5, GetPromptVersionResponseFormat6], # optional
"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", "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": Union[GetPromptVersionResponseFormatText, GetPromptVersionResponseFormatJSONObject, GetPromptVersionResponseFormatPromptsJSONSchema], # optional
"reasoning_effort": Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]],
"verbosity": Optional[str],
"seed": Optional[float],
"stop": Union[str, List[str]], # optional
"stream_options": { # optional
"include_usage": Optional[bool],
},
"thinking": Union[ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema], # optional
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": Union[GetPromptVersionToolChoice1, GetPromptVersionToolChoice2], # optional
"parallel_tool_calls": Optional[bool],
"modalities": List[Literal["text", "audio"]], # optional
"guardrails": [{ # optional
"id": Union[GetPromptVersionID1, str],
"execute_on": Literal["input", "output"],
}],
"plugins": List[Union[PIIRedactionPluginAuto, PIIRedactionPluginEn, PIIRedactionPluginNl, 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": Union[GetPromptVersionLoadBalancer1], # optional
"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" | "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?: GetPromptVersionResponseFormat1 | GetPromptVersionResponseFormat2 | GetPromptVersionResponseFormat3 | GetPromptVersionResponseFormat4 | GetPromptVersionResponseFormat5 | GetPromptVersionResponseFormat6;
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" | "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?: GetPromptVersionResponseFormatText | GetPromptVersionResponseFormatJSONObject | GetPromptVersionResponseFormatPromptsJSONSchema;
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
verbosity?: string;
seed?: number;
stop?: string | string[];
streamOptions?: {
includeUsage?: boolean;
};
thinking?: ThinkingConfigDisabledSchema | ThinkingConfigEnabledSchema | ThinkingConfigAdaptiveSchema;
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: GetPromptVersionToolChoice1 | GetPromptVersionToolChoice2;
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: GetPromptVersionId1 | string;
executeOn: "input" | "output";
}[];
plugins?: (PIIRedactionPluginAuto | PIIRedactionPluginEn | PIIRedactionPluginNl | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbacks?: {
model: string;
}[];
retry?: {
count?: number;
onCodes?: number[];
};
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: GetPromptVersionLoadBalancer1;
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;
}