Why am I getting 400 CONTENT_TOO_LONG?

The text is over 100,000 characters, the limit for score, evaluate and chat. The reply includes maxLength (100000) and actualLength. Shorten it or split it.

Last updated

What each route returns

What each route returns
RouteFieldMessage
POST /api/scoreresponseTextresponseText too long
POST /api/evaluateresponseTextContent too long
POST /api/chatmessageMessage too long

All three use code CONTENT_TOO_LONG. A request body over 200,000 bytes is refused first, with 400 Request body too large (BODY_TOO_LARGE).

Fix

  • Score the final answer, without logs or quoted sources.
  • Or split a long document into sections and score each one. Each section is a separate call and uses credits.

Was it charged?

No.