Submit a new AI job for asynchronous execution. The AI will analyze the prompt, generate and execute queries against the specified model, and produce a summarized answer.
Jobs are processed by a background worker and typically complete within 15–60 seconds. Use Get AI job status to poll for status, or configure a webhookUrl to receive a notification when the job completes. Optionally continue an existing conversation by providing a conversationId.
If a webhookUrl is configured, it will receive a POST with the following body when the job reaches a terminal state:
{
"event_id": "evt_550e8400_COMPLETE_1706123456",
"jobId": "550e8400-...",
"status": "COMPLETE",
"result_summary": "Generated revenue report showing $1.2M total revenue",
"metadata": { "slack_channel": "C123456" },
"completed_at": "2025-01-24T10:30:00Z"
}
The request will also include the following signature headers:
X-Omni-Signature-Timestamp - unixX-Omni-Signature - (sha256=HMAC(timestamp.body, secret))The webhook payload includes result_summary which can contain actual data values from query results. Full result detail (CSV data, query definitions, actions) requires calling the Stream AI job results endpoint with credentials.
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Requires an Organization API key. The ID of the user to run the query as.
Personal Access Tokens (PATs) cannot use this parameter to act on behalf of other users.
The ID of the model to run the AI job against
Natural language instruction describing the desired task
Optional conversation ID to continue an existing conversation
Optional branch ID for the model. Must be a branch of the shared model specified by modelId. Use this to query against in-progress model changes.
Topic name to scope query generation. If not provided, the AI will automatically select the best topic.
An optional webhook URL for job completion notifications
An HMAC-SHA256 secret for signing webhook payloads
Opaque metadata passed back unchanged in webhook payloads
AI job created successfully