Errors

HTTP statuses, tool errors and what to do.

Problems with a tool call come back as a normal result with isError set to true. Problems with the connection come back as an HTTP status with a JSON-RPC error.

HTTP errors

StatusMeaningWhat to do
400The body isn't valid JSON-RPCSend one JSON-RPC message per request
401Missing, wrong, revoked or expired key or tokenRefresh the token, or reconnect from Agents
403Origin not allowed, account blocked, or no accessCall from a server, or check the connection on Agents
413The request is too bigUse import_media or create_upload_link
423The connection is locked after repeated limit breaksWait until the time in the message
429Too many requestsSlow down and retry later
503Agent access is paused by the Drefly teamTry again later
Example
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": { "code": -32001, "message": "This key is locked until 2026-11-26 19:40 UTC after repeated limit breaks." }
}

Tool errors

Message starts withMeaning
This key can't do thatThe connection has read access only, or the ad belongs to another connection
This key is new, so it can only readAPI key in its first 60 minutes
This account is too newAgents can write once the account is 24 hours old
There are already 2 unpaid ads from agentsPay or cancel one first
Invalid argumentsAn argument is missing, unknown or the wrong type
That link can't be importedNot public https, or the file type or size isn't allowed
Example
{
  "content": [{ "type": "text", "text": "There are already 2 unpaid ads from agents. Pay or cancel one first." }],
  "isError": true
}

Next steps

Was this page helpful?