Submit task and get stream URL

Submit a task and immediately receive the workflow ID and SSE stream URL for real-time updates. This is a convenience endpoint that combines task submission with stream URL generation in a single call.

post/api/v1/tasks/stream

Request

  • Base URL: http://localhost:8080
  • URL: http://localhost:8080/api/v1/tasks/stream
  • Auth: API key in header X-API-Key

Headers

Idempotency-Keystring

Unique key for idempotent requests

Request body

contextobject

Additional context for the task (recognized keys: role, model_tier, model_override, provider_override, system_prompt, prompt_params, template, template_name (alias), template_version, disable_ai, history_window_size, use_case_preset, primers_count, recents_count, compression_trigger_ratio, compression_target_ratio)

mode'simple' | 'standard' | 'complex' | 'supervisor'

Execution mode (advanced): simple|standard|complex|supervisor. Omit to auto-detect.

model_overridestring

Specific model override (injects into context.model_override, e.g., 'gpt-5.6-terra', 'claude-sonnet-5')

model_tier'small' | 'medium' | 'large'

Preferred model tier (injects into context.model_tier)

provider_overridestring

Provider override (injects into context.provider_override, e.g., 'openai', 'anthropic')

querystring required

The task query or command

session_idstring

Session ID for continuity (UUID or custom string)

Example request

{
  "context": {
    "compression_target_ratio": 0.375,
    "compression_trigger_ratio": 0.75,
    "disable_ai": true,
    "history_window_size": 75,
    "model_override": "gpt-5-2025-08-07",
    "model_tier": "large",
    "primers_count": 3,
    "prompt_params": {
      "current_date": "2025-09-01",
      "profile_id": "49598h6e"
    },
    "recents_count": 20,
    "role": "analysis",
    "system_prompt": "You are a concise assistant.",
    "template": "research_summary",
    "template_version": "1.0.0"
  }
}

Response

Task submitted successfully with stream URL

stream_urlstring required

SSE endpoint URL to stream real-time events for this task

task_idstring required

Task identifier (same as workflow_id)

workflow_idstring required

Unique workflow identifier for this task

Example response

{
  "stream_url": "/api/v1/stream/sse?workflow_id=task-user123-1234567890",
  "task_id": "task-user123-1234567890",
  "workflow_id": "task-user123-1234567890"
}

Changes

No recorded changes to this operation across all 1 revision of this API.