Skip to main content
POST
/
v2
/
prompts
Create a prompt
curl --request POST \
  --url https://api.orq.ai/v2/prompts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "display_name": "<string>",
  "prompt": {
    "model": "openai/gpt-4o",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant"
      },
      {
        "role": "user",
        "content": "What is the weather today?"
      }
    ],
    "temperature": 0.7,
    "max_tokens": 1000
  },
  "path": "Default",
  "description": "<string>",
  "metadata": {
    "language": "English"
  }
}
'
{
  "_id": "<string>",
  "owner": "<string>",
  "domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created": "<string>",
  "updated": "<string>",
  "display_name": "<string>",
  "prompt": {
    "name": "<string>",
    "audio": {},
    "frequency_penalty": 123,
    "max_tokens": 123,
    "max_completion_tokens": 123,
    "logprobs": true,
    "top_logprobs": 10,
    "n": 2,
    "presence_penalty": 123,
    "response_format": {},
    "verbosity": "<string>",
    "seed": 123,
    "stop": "<string>",
    "stream_options": {
      "include_usage": true
    },
    "thinking": {},
    "temperature": 1,
    "top_p": 0.5,
    "top_k": 123,
    "parallel_tool_calls": true,
    "modalities": [],
    "guardrails": [
      {}
    ],
    "fallbacks": [
      {
        "model": "openai/gpt-4o-mini"
      }
    ],
    "retry": {
      "count": 3,
      "on_codes": [
        429,
        500,
        502,
        503,
        504
      ]
    },
    "cache": {
      "ttl": 3600
    },
    "load_balancer": {
      "type": "weight_based",
      "models": [
        {
          "model": "openai/gpt-4o",
          "weight": 0.7
        },
        {
          "model": "anthropic/claude-3-5-sonnet",
          "weight": 0.3
        }
      ]
    },
    "timeout": {
      "call_timeout": 30000
    },
    "messages": [
      {
        "content": "<string>",
        "name": "<string>"
      }
    ],
    "model": "openai/gpt-4o",
    "version": "<string>"
  },
  "created_by_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updated_by_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "<string>",
  "prompt_config": {
    "messages": [
      {
        "content": "<string>",
        "tool_calls": [
          {
            "function": {
              "name": "<string>",
              "arguments": "<string>"
            },
            "id": "<string>",
            "index": 123
          }
        ],
        "tool_call_id": "<string>"
      }
    ],
    "stream": true,
    "model": "<string>",
    "model_db_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "model_parameters": {
      "temperature": 123,
      "maxTokens": 123,
      "topK": 123,
      "topP": 123,
      "frequencyPenalty": 123,
      "presencePenalty": 123,
      "numImages": 123,
      "seed": 123,
      "dimensions": "<string>",
      "quality": "<string>",
      "style": "<string>",
      "responseFormat": {
        "json_schema": {
          "name": "<string>",
          "schema": {},
          "description": "<string>",
          "strict": true
        },
        "display_name": "<string>"
      },
      "budgetTokens": 123
    },
    "integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "version": "<string>"
  },
  "metadata": {
    "language": "English"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.orq.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
display_name
string
required

The prompt’s name, meant to be displayable in the UI.

Maximum string length: 128
prompt
PromptInput · object
required

Prompt configuration with model and messages.

Example:
{
  "model": "openai/gpt-4o",
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant"
    },
    {
      "role": "user",
      "content": "What is the weather today?"
    }
  ],
  "temperature": 0.7,
  "max_tokens": 1000
}
path
string
required

Entity storage path.

With workspace-level API keys, use the format project/folder/subfolder/.... The first element identifies the project, followed by nested folders (auto-created as needed). Example: Default/agents.

With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: agents. For backward compatibility, a leading project name is ignored when it matches the scoped project.

Example:

"Default"

description
string | null

The prompt’s description, meant to be displayable in the UI. Use this field to optionally store a long form explanation of the prompt for your own purpose

metadata
object

Response

200 - application/json

Prompt created.

A prompt entity with configuration, metadata, and versioning.

_id
string
required
type
enum<string>
required
Available options:
prompt
owner
string
required
domain_id
string<uuid>
required
created
string
required
updated
string
required
display_name
string
required

The prompt’s name, meant to be displayable in the UI.

Maximum string length: 128
prompt
PromptField · object
required

Prompt configuration with model and messages. Use this instead of prompt_config.

created_by_id
string<uuid> | null
updated_by_id
string<uuid> | null
description
string | null

The prompt’s description, meant to be displayable in the UI. Use this field to optionally store a long form explanation of the prompt for your own purpose

prompt_config
object
deprecated

[DEPRECATED] Use the prompt property instead. A list of messages compatible with the openAI schema.

metadata
object