24-10-2026: Agent Endpoints Return an Error Status When a Request Cannot Start
POST /api/v1/agent/fast and POST /api/v1/agent/expert used to answer every request with 200 and a stream. When the agent could not take the request, the stream held a single error event, and the request was still charged at the endpoint's full credit cost.
The endpoints now return an HTTP error status with the standard JSON error body when the request fails before the stream starts. Nothing is charged, and X-Nansen-Credits-Used is 0.
Status
code
When
404
not_found
The conversation_id you sent belongs to another account.
502
upstream_unavailable
The agent is unavailable. Retry after the Retry-After delay.
504
query_timeout
The agent did not respond in time.
What this means for your requests:
Check the HTTP status before you read the response as a stream.
A successful request is unchanged:
200with thedelta,tool_callandfinishevents, thendata: [DONE].An agent failure after the stream has started now ends the stream with an
errorevent instead offinish. Before, some of these failures ended with a normalfinishevent, so a truncated answer looked complete. A stream withoutfinishis incomplete.An
errorevent withstatus_code400means the conversation is too long. Start a new conversation by omittingconversation_id.Only send a
conversation_idthat afinishevent returned to you, or omit it to start a new conversation.
Last updated
Was this helpful?