AI Responses API

The Responses API is the engine behind investigations and "Ask CloudPeek." It's modelled on the OpenAI Responses API, so if you've used that, this will feel familiar. You use it to run the AI agent, with access to your connected tools, and stream its output.

Base path: /api/v1/responses · Permission resource: response. All requests require authentication.

Endpoints

MethodPathPurposePermission
POST/responses/Create a model response (sync or streamed)response:create
GET/responses/List stored responsesresponse:read
GET/responses/{response_id}Retrieve a stored responseresponse:read
DELETE/responses/{response_id}Delete a responseresponse:delete
GET/responses/{response_id}/input_itemsThe stored input itemsresponse:read
POST/responses/{response_id}/cancelCancel a running executionresponse:write
GET/responses/{response_id}/status{ status, event_count }response:read
GET/responses/{response_id}/stream?last_seq=Reconnect to the SSE streamresponse:read
GET/responses/active/{investigation_id}The active streaming response for an investigationresponse:read
GET/responses/modelsList the tenant's available chat modelsresponse:read
GET/responses/models/embeddingList embedding modelsresponse:read
GET/responses/agentsList agents (for agent_id)response:read
GET/responses/analyticsUsage/analytics dataresponse:read

Create a response

POST /api/v1/responses/ runs the agent. Key body fields:

FieldTypeNotes
modelstringrequired: a model id from GET /responses/models
inputstring \arraythe prompt, or a list of input items
instructionsstringoptional system-style instructions
streambooltrue to stream results over SSE (default false)
toolsarraytool configuration (optional)
tool_choicestring or objecthow tools may be chosen
temperaturenumber0-2
max_output_tokensintcap on output
previous_response_idstringcontinue a prior response
investigationobject{ "title": "…" } to create a new investigation for this run
investigation_idintattach to an existing investigation
wiki_entitystring"<type>:<key>" to scope an "Ask the Wiki" question

Exactly one of investigation, investigation_id, wiki_entity (or a scan id) must be provided, and you can't combine investigation with investigation_id.

Synchronous example

curl -s -X POST "http://localhost:8000/api/v1/responses/" \
  -H "Authorization: Bearer $CLOUDPEEK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "model": "bedrock/anthropic.claude-3-5-sonnet",
        "input": "Investigate incident 101 and summarise findings",
        "investigation": { "title": "IAM key triage" }
      }'

Streaming example (Server-Sent Events)

Set stream: true and read the text/event-stream response:

curl -N -X POST "http://localhost:8000/api/v1/responses/" \
  -H "Authorization: Bearer $CLOUDPEEK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "model": "bedrock/anthropic.claude-3-5-sonnet",
        "input": "Investigate incident 101",
        "investigation_id": 42,
        "stream": true
      }'
# → a stream of response.* events

If a stream drops, reconnect with GET /responses/{response_id}/stream?last_seq=<n> to resume from where you left off, or poll GET /responses/{response_id}/status.

The response object

A response includes id, object: "response", created_at, status, output (the produced items), model, usage (token counts), metadata, and, when applicable, investigation_id and required_action (for example, a tool call awaiting HITL approval).

Discovering models

Use GET /responses/models to see which chat models your tenant has configured (via Model Providers), and GET /responses/models/embedding for embedding models. Pass the returned id as model when creating a response.

© 2026 CloudPeek. Agentic AI for high-consequence security operations.