Skip to main content
POST
/
api
/
react
ReAct Agent Streaming
curl --request POST \
  --url https://your-domain.com/api/react \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "q": "What is the capital of France?",
  "conversation_id": "conv_123abc",
  "agent_id": null,
  "token": "fim_your_api_key_here"
}
'
"event: step\ndata: {\"type\": \"tool_call\", \"tool\": \"search\", \"input\": \"capital of France\"}\n\nevent: answer\ndata: {\"type\": \"delta\", \"text\": \"The capital of France is Paris.\"}\n\nevent: done\ndata: {\"answer\": \"The capital of France is Paris.\", \"tokens\": 42}\n\nevent: end\ndata: {}\n\n"

Authorizations

Authorization
string
header
required

API Key (fim_xxx) or JWT token

Body

application/json
q
string
required

The user query or message

conversation_id
string | null

Attach to an existing conversation (optional)

agent_id
string | null

Bind to a specific agent (optional)

token
string | null

API key (fim_xxx) or JWT token for SSE (optional, alternative to Authorization header)

image_ids
string | null

Comma-separated image IDs to attach (optional)

user_metadata
string | null

JSON string of custom metadata (optional)

Response

Server-Sent Events stream

The response is of type string.