Skip to main content
Use Cases
  • Updating copy or instructions without a code deploy.
  • Sharing a single prompt definition across multiple services.
  • Letting non-engineers iterate on prompts through the UI without touching code.

Overview

The orq.prompt parameter references a Prompt created in Orq.ai instead of hardcoding its messages in application code. The referenced prompt’s messages are prepended to the request messages before the model is called. orq.prompt is supported on the Chat Completions endpoint POST https://my.orq.ai/v2/router/chat/completions. Only the latest version of a prompt can be referenced.

Quick Start

Prerequisites: the Prompt must be created in Orq.ai before use. Copy its ID from the Prompts page.

Configuration

How it works

  1. The router resolves the referenced Prompt at request time.
  2. The prompt’s messages are inserted at the start of the request messages.
  3. When the Prompt has a model configured, that model replaces the request model.
  4. When the prompt ID cannot be resolved, the request runs unchanged with the original messages and model. No error is returned.
Because resolution happens at request time, saving a change to the Prompt in Orq.ai takes effect on the next request without redeploying the application.

Troubleshooting

Prompt content missing from responses A request with an unresolvable prompt reference does not fail; it runs without the prompt’s messages. Check the following:
  • Verify the prompt ID is correct.
  • Check the Prompt exists in the workspace the API Key belongs to.
  • Verify the Prompt was saved after the last edit.
Unexpected model used A model configured on the Prompt overrides the model set in the request. Remove the model from the Prompt configuration to keep the request’s model.

Limitations