In-app assistant

POST /assistant/sessions/{id}/messages 工作階段或 API 金鑰

Send a message and stream the turn as Server-Sent Events.

Body is {"text": "..."} (max ~8000 characters, deployment-configured). The response is text/event-stream, not JSON: each frame is event: <kind> plus a data: line carrying the JSON event (whose own type field repeats the kind). Kinds: queued (this turn waited for one already running), user_prompt, assistant_text / assistant_thought (streamed deltas), tool_use / tool_result, usage, and exactly one terminal result carrying stop_reason (completed, cancelled, or error). The turn keeps running even if you stop reading — stopping it is a separate call to .../cancel.

路徑參數

id string (UUID) 必填
The session id.

請求內容

text string 必填
Your message.範例 Should I relocate for this role?
curl
curl -N -X POST "https://freehire.me/api/v1/assistant/sessions/<id>/messages" \
  -H "Authorization: Bearer $FREEHIRE_API_KEY" -H 'Content-Type: application/json' \
  -d '{"text":"Should I relocate for this role?"}'
json — response
event: user_prompt
data: {"type":"user_prompt","text":"Should I relocate for this role?"}

event: assistant_text
data: {"type":"assistant_text","text":"Based on the salary range..."}

event: result
data: {"type":"result","stop_reason":"completed"}

要針對這個職缺調整履歷嗎?

目前無法檢查您與這個職缺的符合程度;請先將履歷加入個人檔案,下次即可查看。

A new version of freehire is available