Skip to main content
POST
cURL

Authorizations

x-api-key
string
header
required

API key for authentication. Contact support@verahealth.ai to obtain your API key.

Body

application/json

Request envelope for POST /api/chat/v2.

question
string
required

The clinical question to answer.

Minimum string length: 1
Example:

"Is amoxicillin safe with warfarin?"

metadata
object
required

Your identifiers and routing fields. Returned byte-identical on every response event. Additional fields are accepted and echoed unchanged.

context

Optional prior conversation. Accepts either a free-form string or an array of {role, content} turns (recommended).

stream
boolean
default:true

If true (default), the response is an SSE stream. If false, the response is a single JSON payload returned once the answer is complete.

Response

When stream is true (default), the response is a Server-Sent Events stream (Content-Type: text/event-stream). Each frame is data: {JSON}\n\n and carries a top-level type discriminator. See the streaming guide for the full event catalog.

When stream is false, the response is a single JSON payload (Content-Type: application/json) returned once the answer is fully generated. It carries your request metadata echoed byte-identical, and groups Vera-specific fields (references, progress, workflow_run_id, doi_reference_map, evidence_levels, suggested_questions) under vendor_metadata. See the application/json example below.

Streaming event types

Response headers (streaming only)

SSE stream of flat JSON events. Each event has a type discriminator. See the streaming guide for the full event catalog.