Eevo console
Contents
Reference

Errors

Error responses provided by the Eevo API have the following format:

JSON
{
  "error": {
    "type": "insufficient_credit",
    "message": "Your balance is $0.00. Buy credits in the Eevo console."
  }
}
StatusTypeMeaning
400invalid_requestThe request body does not match the schema or exceeds a limit, and the message names the field. A request for a decision that does not exist in your organization, or is not shared with you, gets this type with status 410.
400too_many_overlap_pairsThe consequence-based decision has more consequence pairs to check for overlap than the limit allows. Send fewer consequences, or give each one only the stakeholders it affects.
401authenticationThe API key is missing, invalid or revoked. A 403 with the same type means the key is not allowed to change who sees the decision or to publish it.
402insufficient_creditThe balance cannot pay for the request, or the request asks for the EU and your organization has neither bought credit nor has credit.
409model_unavailableEevo-1 is not available in this mode right now (no serving endpoint).
409revision_conflictThe decision you are revising already has a newer revision, which the message names. Revise that one instead.
429rate_limitedThe request hit a rate limit, or your organization already has the maximum number of consequence-based decisions running. Retry after the number of seconds in Retry-After.
503model_warmingThe model is starting after being idle, which takes a few minutes. Retry after the number of seconds in Retry-After. Nothing is charged.
503region_unavailableA request for the EU found no EU server available. Retry after the number of seconds in Retry-After. Nothing is charged.
5xxserver_errorThe model did not answer (502), the request timed out (504), or Eevo hit an unexpected error. Retry with backoff. Nothing is charged.

Errors are not charged.

Retrying

Retry a 429 or a 5xx after the number of seconds in the response's Retry-After header, or after a minute if there is none, and give up after a few attempts. A 409 model_unavailable also clears on its own, so it can be retried after a minute. Other errors do not clear on their own, so retrying them does not help. Below is an example of a loop that retries 429 and 5xx responses:

import os
import time

import requests

HEADERS = {"Authorization": f"Bearer {os.environ['EEVO_API_KEY']}"}


def ask(body):
    for _ in range(5):
        response = requests.post("https://eevo.io/api/v1/systemone", headers=HEADERS, json=body)
        if response.ok:
            return response.json()
        retryable = response.status_code == 429 or response.status_code >= 500
        if not retryable:
            error = response.json()["error"]
            raise RuntimeError(f"{error['type']}: {error['message']}")
        time.sleep(float(response.headers.get("Retry-After", 60)))
    raise RuntimeError("Eevo did not answer after 5 attempts")