People working together around a table with laptops, notebooks and drinks, banner image on the API reference: errors page

Developers

API reference: errors

Error format and codes for the HiringsAI API

Status on hiringsai.com: the tool catalogue (GET /api/v1/tools), MCP list_tools and get_tool, and text generation (POST /api/v1/ai/complete, MCP ai_complete) are documented below. Text generation uses Llama 3.1 8B on Cloudflare Workers AI under a daily free allowance, so it can answer 429 or 503 when the limit is reached. The catalogue lists 139 tools and all 139 are runnable via API and MCP.

Format

{"error":{"code":"invalid_prompt","message":"prompt required (max 4000 chars)"}}

MCP calls use JSON-RPC errors instead; see MCP server.

Codes seen in checked calls

400 invalid_prompt           POST /api/v1/ai/complete with {}
403 origin_not_allowed       Origin header from a non-HiringsAI site
404 not_found                unknown tool slug or unknown /api/v1 route
405 method_not_allowed       GET /mcp
415 unsupported_media_type   Content-Type is not application/json

Codes defined but not triggered in testing

429 rate_limited             over 20 requests/minute for your client
503 daily_capacity_reached   daily AI allowance used, resets 00:00 UTC
503 ai_unavailable           AI binding missing
500 internal_error           unexpected failure
A wooden desk with glasses, a coffee cup, a plant and the edge of a laptop, banner image on the API reference: errors page

Start with a free tool.

Open one and see it work. No account needed.

API errors

See it at work

Real tool results from the HiringsAI API, shown the way you will see them.

API errors
403
429
Body
origin_not_allowed
rate_limited
Error body
curl -i -X POST https://hiringsai.com/api/v1/ai/complete -H "Origin: https://evil.example"
HTTP/2 403
origin_not_allowed
POST /api/v1/ai/complete (21st call in a minute)
HTTP/2 429
rate_limited: try again shortly
{"error":{"code":"rate_limited",
"message":"rate limited, try again shortly"}}
Live API139 toolsNo keys
Catalogue
tools139
runnable139
routeGET /api/v1/tools
Origin check
Origin: https://evil.example
403
origin_not_allowed
Rate limit
allowed per minute20
shared daily allowanceabout 8,000 units
MCP
POST https://hiringsai.com/mcp
tools/list
143 entries
A laptop showing a web search on a table
GET /api/v1/tools139 tools
Read the whole catalogue with one request.
A laptop on a wooden desk with a person typing
Origin check403 origin_not_allowed
Calls from other sites are refused.
A desktop computer on a white desk with a lamp
Rate limit429 after 20
20 AI requests per minute per client.
A desk seen from above with a laptop, headphones and a camera
MCPtools/list and tools/call
Point your editor at the MCP server.

In depth

Errors, grouped by what to do next

Every error from the web routes has the same shape. This page groups the codes by what you should do: fix the request, slow down, or wait. It also shows how the MCP route reports the same problems.

Overview

The page at a glance

One shape for every weberrorErrors thatmean the callwas wrongErrors thatmean waitErrors thatmean theservice has aproblemHow the MCP route reportsproblemsThe fourroutes at aglanceThe limits,with theexact numbersPlain wordsfor the termson this pageErrors,grouped bywhat to donextTHIS PAGE
Parts: One shape for every web error, Errors that mean the call was wrong, Errors that mean wait, Errors that mean the service has a problem, How the MCP route reports problems, The four routes at a glance, The limits, with the exact numbers, Plain words for the terms on this page
1ShapeAn error answer holds an error objectwith a code and a message.2Fix the requestThese errors mean something in therequest needs to change. Retrying thesame call gives the same answer.3Slow downThese errors mean the request was finebut the service is protecting a sharedallowance. Waiting fixes them.4Not in your handsai_unavailable means the text model isnot connected to the service.5MCPMCP uses JSON-RPC errors, which carry anumber.6ReferenceHiringsAI has a small public surface.7ReferenceOne shared limiter covers every routethat uses the text model.IN ORDER
What each part tells you, in order

Shape

One shape for every web error

An error answer holds an error object with a code and a message. The code is for your program. The message is for a person reading a log. The HTTP status carries the same meaning as the code.

9codes in all
5seen in checked calls
4written but not triggered
1shape for all of them
{"error":{"code":"invalid_prompt","message":"prompt required (max 4000 chars)"}}

01 / 08

01 / 08

An error answer holds an error object with a code and a message

The code is for your program.

Fix the request

Errors that mean the call was wrong

400CODEinvalid_promptWHAT TO CHANGESend a non-empty prompt of 4000characters or fewer.ROW
Row: 400

These errors mean something in the request needs to change. Retrying the same call gives the same answer.

StatusCodeWhat to change
400invalid_promptSend a non-empty prompt of 4000 characters or fewer.
404not_foundCheck the slug or the route path.
405method_not_allowedUse POST for /mcp.
415unsupported_media_typeSend the header Content-Type: application/json.
403origin_not_allowedCall from a server, or from a HiringsAI page, not from another website in a browser.
404CODEnot_foundWHAT TO CHANGECheck the slug or the route path.ROW
Row: 404
405CODEmethod_not_allowedWHAT TO CHANGEUse POST for /mcp.ROW
Row: 405
415CODEunsupported_media_typeWHAT TO CHANGESend the header Content-Type:application/json.ROW
Row: 415
403CODEorigin_not_allowedWHAT TO CHANGECall from a server, or from a HiringsAIpage, not from another website in abrowser.ROW
Row: 403
invalid_promptnot_foundmethod_not_allowedunsupported_media_typeorigin_not_allowed400404405415403MATRIX
Who or what does each row: invalid_prompt, not_found, method_not_allowed, unsupported_media_type, origin_not_allowed
Send a non-emptyprompt of 4000characters orfewer.Check the slugor the routepath.Use POST for/mcp.Send the headerContent-Type:application/json.Call from aserver, or froma HiringsAIpage, not fromanother websitein a browser.400404405415403MATRIX
Who or what does each row: Send a non-empty prompt of 4000 characters or fewer., Check the slug or the route path., Use POST for /mcp., Send the header Content-Type: application/json., Call from a server, or from a HiringsAI page, not from another website in a browser.
1400invalid_prompt2404not_found3405method_not_allowed4415unsupported_media_type5403origin_not_allowedINDEX
Index: 400, 404, 405, 415, 403
400404405415403Errors thatmean thecall waswrongMAP
Map: 400, 404, 405, 415, 403

02 / 08

02 / 08

Change the call, then try again

These errors repeat until the request is fixed.

Slow down

Errors that mean wait

1Wait a few seconds and tryonce2Stop for the daySTEPS
Steps: On 429, On 503 daily

These errors mean the request was fine but the service is protecting a shared allowance. Waiting fixes them.

Calls per minute20Daily units (about)8,000
  1. On 429Wait a few seconds and try once. Count your calls so you stay under 20 a minute.
  2. On 503 dailyStop for the day. Tool list calls still work, because they are not limited.
StatusCodeHow long to wait
429rate_limitedUntil the minute you are counted in has passed.
503daily_capacity_reachedUntil 00:00 UTC.
On 429Wait a few seconds and try once.Count your calls so you stay under 20 aminute.STEP
Step: On 429
On 503 dailyStop for the day.Tool list calls still work, because theyare not limited.STEP
Step: On 503 daily
429CODErate_limitedHOW LONG TO WAITUntil the minute you are counted in haspassed.ROW
Row: 429
503CODEdaily_capacity_reachedHOW LONG TO WAITUntil 00:00 UTC.ROW
Row: 503
1On 429Wait a few seconds and try once. Countyour calls so you stay under 20 aminute.2On 503 dailyStop for the day. Tool list calls stillwork, because they are not limited.3429rate_limited4503daily_capacity_reachedINDEX
Index: On 429, On 503 daily, 429, 503
On 429On 503 daily429503Errors thatmean waitMAP
Map: On 429, On 503 daily, 429, 503

03 / 08

03 / 08

These errors mean the request was fine but the service is protecting a shared allowance

Waiting fixes them.

Not in your hands

Errors that mean the service has a problem

ai_unavailable means the text model is not connected to the service. internal_error means something unexpected failed, and the message says what. Neither can be fixed from your side. Try again later.

ai_unavailable
503. The text model is not connected.
internal_error
500. An unexpected failure, with a message.
1ai_unavailable503. The text model is not connected.2internal_error500. An unexpected failure, with amessage.IN ORDER
In order: ai_unavailable, internal_error

04 / 08

04 / 08

Some errors are ours to fix

If you see these, nothing in your call needs to change.

MCP

How the MCP route reports problems

1Body is not validJSONHTTP 400 and error -327002Unknown methodError -326013Unknown tool nameError -326024Tool fails (limit,unknown slug)Result with isError: trueIN ORDER
In order: Body is not valid JSON, Unknown method, Unknown tool name, Tool fails (limit, unknown slug)

MCP uses JSON-RPC errors, which carry a number. An unknown method returns -32601 "Method not found". A body that is not valid JSON returns -32700 "Parse error". An unknown tool name returns -32602 "Unknown tool".

A tool that runs but fails, such as a rate limit or an unknown slug, returns HTTP 200 with isError: true and a message in the result text.

{"jsonrpc":"2.0","id":9,"error":{"code":-32601,"message":"Method not found"}}
SituationWhat you get
Body is not valid JSONHTTP 400 and error -32700
Unknown methodError -32601
Unknown tool nameError -32602
Tool fails (limit, unknown slug)Result with isError: true
Body is not valid JSONUnknownmethodUnknown tool nameTool fails(limit,unknown slug)How the MCProutereportsproblemsMAP
Map: Body is not valid JSON, Unknown method, Unknown tool name, Tool fails (limit, unknown slug)
HTTP 400 and error-32700Error -32601Error -32602Result with isError:trueBody is not valid JSONUnknown methodUnknown tool nameTool fails (limit,unknown slug)MATRIX
Who or what does each row: HTTP 400 and error -32700, Error -32601, Error -32602, Result with isError: true

Reference

The four routes at a glance

Your program or AI clientHiringsAI checks the callTool list or text replyPATH
In order: Your program or AI client then HiringsAI checks the call then Tool list or text reply

HiringsAI has a small public surface. Three web routes and one protocol route cover everything on this site that a program can call. This table is the same on every developer page so you can keep it open while you work.

Your programor AI clientHiringsAIchecks the callTool listor text reply
RouteMethodWhat it doesNeeds
/api/v1/toolsGETReturns count and a tools list. Add ?suite=build, ?suite=automate or ?suite=computer to narrow it.Nothing. No key, no account.
/api/v1/tools/{slug}GETReturns one tool: slug, name, suite, summary, available, url and runs.The tool slug in the path.
/api/v1/ai/completePOSTSends a prompt to the text model and returns text and model.A JSON body with prompt, and the header Content-Type: application/json.
/mcpPOSTSpeaks JSON-RPC 2.0 so an AI client can list and call the three tools.A JSON-RPC body. A GET returns 405.

Tools run in the browser, on the tool page. The API describes them and lists them. It does not run them for you.

/api/v1/toolsMETHODGETWHAT IT DOESReturns count and a tools list. Add?suite=build, ?suite=automate or?suite=computer to narrow it.NEEDSNothing. No key, no account.ROW
Row: /api/v1/tools
/api/v1/tools/{slug}METHODGETWHAT IT DOESReturns one tool: slug, name, suite,summary, available, url and runs.NEEDSThe tool slug in the path.ROW
Row: /api/v1/tools/{slug}
/api/v1/ai/completeMETHODPOSTWHAT IT DOESSends a prompt to the text model andreturns text and model.NEEDSA JSON body with prompt, and the headerContent-Type: application/json.ROW
Row: /api/v1/ai/complete
/mcpMETHODPOSTWHAT IT DOESSpeaks JSON-RPC 2.0 so an AI client canlist and call the three tools.NEEDSA JSON-RPC body. A GET returns 405.ROW
Row: /mcp
GETPOST/api/v1/tools/api/v1/tools/{slug}/api/v1/ai/complete/mcpMATRIX
Who or what does each row: GET, POST
2GET2POSTTALLY
Tally by method: GET, POST
Returns count and atools list. Add?suite=build,?suite=automate or?suite=computer tonarrow it.Returns one tool:slug, name, suite,summary, available,url and runs.Sends a prompt to thetext model andreturns text andmodel.Speaks JSON-RPC 2.0so an AI client canlist and call thethree tools./api/v1/tools/api/v1/tools/{slug}/api/v1/ai/complete/mcpMATRIX
Who or what does each row: Returns count and a tools list. Add ?suite=build, ?suite=automate or ?suite=computer to narrow it., Returns one tool: slug, name, suite, summary, available, url and runs., Sends a prompt to the text model and returns text and model., Speaks JSON-RPC 2.0 so an AI client can list and call the three tools.
Nothing. No key, noaccount.The tool slug in thepath.A JSON body withprompt, and theheader Content-Type:application/json.A JSON-RPC body. AGET returns 405./api/v1/tools/api/v1/tools/{slug}/api/v1/ai/complete/mcpMATRIX
Who or what does each row: Nothing. No key, no account., The tool slug in the path., A JSON body with prompt, and the header Content-Type: application/json., A JSON-RPC body. A GET returns 405.
1/api/v1/toolsGET2/api/v1/tools/{slug}GET3/api/v1/ai/completePOST4/mcpPOSTINDEX
Index: /api/v1/tools, /api/v1/tools/{slug}, /api/v1/ai/complete, /mcp
/api/v1/tools/api/v1/tools/{slug}/api/v1/ai/complete/mcpThe fourroutes at aglanceMAP
Map: /api/v1/tools, /api/v1/tools/{slug}, /api/v1/ai/complete, /mcp

06 / 08

06 / 08

A small surface, kept honest

Only calls that were run and checked are written down on these pages.

Reference

The limits, with the exact numbers

Requests perminuteVALUE20 per client IPWHAT HAPPENS AT THE EDGEThe twenty-first request in the minutegets a 429 and the message to retryshortly.ROW
Row: Requests per minute

One shared limiter covers every route that uses the text model. It counts calls across all of them together, so switching routes does not reset your count.

Requests per minute20Max reply tokens1,024Prompt characters4,000Daily units (about)8,000
LimitValueWhat happens at the edge
Requests per minute20 per client IPThe twenty-first request in the minute gets a 429 and the message to retry shortly.
Daily text allowanceabout 8,000 estimated unitsNew text requests get a 503 until 00:00 UTC. The units are estimates, not billing figures.
Prompt length4000 charactersLonger prompts get a 400 with invalid_prompt.
Reply lengthmax_tokens up to 1024A larger number is cut down to 1024. If you send none, the service uses 512.
Tool list and tool detailNo limitThese calls do not count toward the 20 per minute.
Daily textallowanceVALUEabout 8,000 estimated unitsWHAT HAPPENS AT THE EDGENew text requests get a 503 until 00:00UTC. The units are estimates, notbilling figures.ROW
Row: Daily text allowance
Prompt lengthVALUE4000 charactersWHAT HAPPENS AT THE EDGELonger prompts get a 400 withinvalid_prompt.ROW
Row: Prompt length
Reply lengthVALUEmax_tokens up to 1024WHAT HAPPENS AT THE EDGEA larger number is cut down to 1024. Ifyou send none, the service uses 512.ROW
Row: Reply length
Tool list andtool detailVALUENo limitWHAT HAPPENS AT THE EDGEThese calls do not count toward the 20per minute.ROW
Row: Tool list and tool detail
20 per client IPabout 8,000estimated units4000 charactersmax_tokens up to1024No limitRequests per minuteDaily text allowancePrompt lengthReply lengthTool list and tooldetailMATRIX
Who or what does each row: 20 per client IP, about 8,000 estimated units, 4000 characters, max_tokens up to 1024, No limit
The twenty-firstrequest in theminute gets a429 and themessage to retryshortly.New textrequests get a503 until 00:00UTC. The unitsare estimates,not billingfigures.Longer promptsget a 400 withinvalid_prompt.A larger numberis cut down to1024. If yousend none, theservice uses512.These calls donot count towardthe 20 perminute.Requests per minuteDaily text allowancePrompt lengthReply lengthTool list and tooldetailMATRIX
Who or what does each row: The twenty-first request in the minute gets a 429 and the message to retry shortly., New text requests get a 503 until 00:00 UTC. The units are estimates, not billing figures., Longer prompts get a 400 with invalid_prompt., A larger number is cut down to 1024. If you send none, the service uses 512., These calls do not count toward the 20 per minute.
1Requests per minute20 per client IP2Daily text allowanceabout 8,000 estimated units3Prompt length4000 characters4Reply lengthmax_tokens up to 10245Tool list and tooldetailNo limitINDEX
Index: Requests per minute, Daily text allowance, Prompt length, Reply length, Tool list and tool detail
Requests per minuteDaily textallowancePrompt lengthReply lengthTool list andtool detailThe limits,with theexactnumbersMAP
Map: Requests per minute, Daily text allowance, Prompt length, Reply length, Tool list and tool detail

07 / 08

07 / 08

One count for every route

Switching between routes does not give you a fresh allowance.

Words used here

Plain words for the terms on this page

EndpointOne address in that set./api/v1/tools is an endpoint.DETAIL
Detail: Endpoint

Short definitions, so you do not need outside reading to follow the rest of the page.

Endpoint
One address in that set. /api/v1/tools is an endpoint.
MCP
A shared way for an AI assistant to find and call tools on another service. HiringsAI speaks it at /mcp.
JSON-RPC
A small message format. You send a JSON object with a method name and the service sends back a JSON object with a result or an error.
Rate limit
A cap on how many calls you can make in a stretch of time, so one user cannot use up the shared allowance.
MCPA shared way for an AI assistant to findand call tools on another service.HiringsAI speaks it at /mcp.DETAIL
Detail: MCP
JSON-RPCA small message format.You send a JSON object with a methodname and the service sends back a JSONobject with a result or an error.DETAIL
Detail: JSON-RPC
Rate limitWHAT IT ISA cap on how many calls you can make ina stretch of time, so one user cannotuse up the shared allowance.DETAIL
Detail: Rate limit
1EndpointOne address in that set. /api/v1/toolsis an endpoint.2MCPA shared way for an AI assistant to findand call tools on another service.HiringsAI speaks it at /mcp.3JSON-RPCA small message format.4Rate limitA cap on how many calls you can make ina stretch of time, so one user cannotuse up the shared allowance.INDEX
Index: Endpoint, MCP, JSON-RPC, Rate limit
EndpointMCPJSON-RPCRate limitPlain wordsfor theterms onthis pageMAP
Map: Endpoint, MCP, JSON-RPC, Rate limit

Questions

Questions, answered in plain words

Do I need an account or a key?

No. The routes on this site are public and have no keys. Calls from other websites in a browser are refused, but calls from curl or a server are accepted.

Can I run the tools through the API?

Yes, for all 139 tools, through run_tool or one tool_NAME per tool. Every entry also has a url that points to its page.

What model writes the text?

Llama 3.1 8B. The reply includes the model name in the model field so you can see what answered.

Why did I get a 429?

You went over 20 requests in a minute from your client, counted across all the text routes. Wait a short while and try again.

Why did I get a 503?

The daily text allowance is used up, or the model is not connected. The allowance resets at 00:00 UTC.

Is there an SDK or a webhook?

No. These pages cover only what exists: the tool list, text generation and the MCP route.