POST
/
v2
/
studio
/
deployment
/
prompt
/
stream
Stream a prompt to a deployment using Server-Sent Events
curl --request POST \
  --url https://api.neynar.com/v2/studio/deployment/prompt/stream \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "fid": 1,
  "deployment_name": "<string>",
  "prompt": "<string>",
  "action": "code-create",
  "options": {}
}'
This response does not have an example.

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

Authorizations

x-api-key
string
header
default:NEYNAR_API_DOCS
required

API key to authorize requests

Body

application/json
fid
integer | null
required

Farcaster ID of the user

Required range: x >= 0
deployment_name
string
required

Kubernetes deployment name

prompt
string
required

Prompt string to send to the deployment

action
enum<string>
default:code-create

Action type for prompt-based operations

Available options:
code-create,
code-edit,
debug,
info,
logs
options
object

Additional options for the prompt

Response

Success