Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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: 200 with the delta, tool_call and finish events, then data: [DONE].

  • An agent failure after the stream has started now ends the stream with an error event instead of finish. Before, some of these failures ended with a normal finish event, so a truncated answer looked complete. A stream without finish is incomplete.

  • An error event with status_code 400 means the conversation is too long. Start a new conversation by omitting conversation_id.

  • Only send a conversation_id that a finish event returned to you, or omit it to start a new conversation.

Last updated

Was this helpful?