ENDPOINT | POST

Ask a Worker

Queues a question and answers at once with a run id. Poll Get a run for the answer (Workers run in a queue, so it takes a few seconds or more).

POSThttps://api.cloverr.co.uk/v1/bees/{handle}/ask

Scope: beesSuccess: 201120 requests a minute per token

Path parameters

handlestringrequiredThe Worker's handle, like scribe.

Body (JSON)

promptstringrequiredUp to 4,000 characters.

Example request & response

Send your token in the Authorization header. A successful response wraps the result in data.

curl -X POST https://api.cloverr.co.uk/v1/bees/scribe/ask \
  -H "Authorization: Bearer $CLOVERR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Summarise this week's customer emails"}'
201 · JSON
{
  "data": {
    "runId": "3f6c1d2e-8a4b-4c1d-9e2f-5a6b7c8d9e0f",
    "status": "queued",
    "bee": "scribe"
  }
}

Errors

StatusCodeWhen
400invalidNo prompt.
404not_foundNo such Worker, or it's switched off.
401unauthorizedNo token, or it's invalid, expired, revoked, or its owner left the organisation.
403forbiddenThe token doesn't have this endpoint's scope.
403ip_not_allowedThe token only works from listed addresses, and this request came from another.
403two_factor_requiredThe organisation requires login verification and the token's owner hasn't set it up.
429rate_limitedMore than 120 requests in a minute with this token. Wait for Retry-After.
500server_errorSomething went wrong on our side. Safe to retry.

Errors look like { "error": { "code", "message" } }. All error codes.