Prompt a deployment with streaming response
Sends a prompt to a specific miniapp generator deployment and returns a streaming response using Server-Sent Events. The response is a continuous stream of Server-Sent Events, not a single JSON payload. Each event contains a JSON object with type, message, and other fields specific to the message type. Requires authentication via API key in the request header. Note: Studio CU is tracked based on LLM token usage, not per API call.
Streaming Response Types
This endpoint uses Server-Sent Events (SSE) for streaming responses, which is why the OpenAPI specification only shows an empty 200 response. The actual streaming response returns the following message types (all exported by@anthropic-ai/claude-code except ErrorMessage):
- SDKAssistantMessage: Claudeβs responses with type
'assistant' - SDKUserMessage: User prompts with type
'user' - SDKResultMessage: Final results with type
'result'and subtypes:'success''error_max_turns''error_during_execution'
- SDKSystemMessage: System messages with type
'system'and subtype'init' - ErrorMessage: Custom error type with:
- type:
'error' - message
- timestamp
- type:
Node.js SDK
π SDK Method: promptDeploymentStream Use this API endpoint with the Neynar Node.js SDK for typed responses and better developer experience.Authorizations
API key to authorize requests
Body
Prompt string to send to the deployment
Optional conversation ID to continue an existing chat. If not provided, a new conversation will be created.
Deployment ID (UUID). Required if name not provided.
Farcaster ID of the user; if not provided, namespace must be provided
x >= 03
Optional images for multimodal messages. Each image is base64-encoded.
Kubernetes deployment name. Required if deployment_id not provided.
Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID.
Optional Claude SDK session ID to resume an existing Claude Code session. Enables session-based conversation continuity.
System prompt variant to use. Defaults to stable if not provided.
canary, beta, stable Response
Success