Skip to main content
POST
Narrative Agent
Generate a chart’s title, subtitle, and caption with natural language. Send a GraphConfig and a prompt, receive an updated GraphConfig via Server-Sent Events. Narrative is written into config.content as TipTap JSON.

Request body

userPrompt is required — the narrative agent needs an instruction to write against. Which fields are produced (title only, title + caption, or all three) depends on the storytelling level derived from metadata.effort.

Response

The response is a Server-Sent Events stream. See SSE Format for parsing details.
Final response data:

HTTP Status Codes

Errors may also arrive as SSE events within a 200 response. See Error Codes.

Authorizations

Authorization
string
header
required

Your Graphy API key (starts with graphy_). Create one in the Graphy console at https://agents.graphy.dev/console/

Body

application/json
config
object
required

The graph configuration object used to render charts. See Graph Config Schema for the complete reference.

userPrompt
string
required

Natural language instruction describing the desired changes

Maximum string length: 10000
metadata
object

Optional tracking information for requests

Response

SSE stream with progress and completion events

SSE event name is "progress"

message
string