Skip to main content
POST
Compile a retrieval rule from natural language

Authorizations

Authorization
string
header
required

A VisIQ API key presented as Authorization: Bearer vq_prod_.... Mint harness keys under Settings → Harness Keys and API keys under Settings → API Keys in the dashboard.

Headers

Idempotency-Key
string

Optional. Makes this write safe to retry: a repeat with the same key, method, path (including its query string) and body within 24 hours returns the stored response with X-Idempotent-Replayed: true instead of running again. Reusing the key with a different request is a 422; a repeat while the first is still running is a 409, until the first request's 2-minute processing lease expires, after which the repeat runs. See REST conventions.

Required string length: 1 - 256
Pattern: ^[A-Za-z0-9_-]+$
X-Idempotency-Key
string

The legacy spelling of Idempotency-Key, accepted with the same behaviour. Sending both with different values is a 400.

Required string length: 1 - 256
Pattern: ^[A-Za-z0-9_-]+$

Query Parameters

stream
boolean

Stream the compilation as Server-Sent Events.

Body

application/json
prompt
string
required
Required string length: 1 - 4000
nodeRef
string
Maximum string length: 255

Response

The compiled rule draft (not yet persisted).

rego_source
string
required
natural_language
string
required
name
string
required
description
string
required
suggested_priority
integer
required
warning
string

Present on the action-facet pre-canned fallback when no AI provider is configured.