Eposyne Director

Models and usage

List the models you may use, choose one per request, and read what you have spent.

GET /v2/models

Returns the models your account may select, grouped by provider. It needs the same key as POST /v2/decide. Each model carries its display name, its price per million input tokens and per million output tokens in US dollars, and the date the price was last checked. The prices are in this response and nowhere else in these pages.

Request
curl https://director.eposyne.com/v2/models \
  -H "Authorization: Bearer $EPOSYNE_API_KEY"
Shape of the response
{
  "providers": [
    {
      "id": "<provider id>",
      "display_name": "<name>",
      "models": [
        {
          "id": "<model id>",
          "display_name": "<name>",
          "input_usd_per_million": <number>,
          "output_usd_per_million": <number>,
          "price_verified_at": "<date>"
        }
      ]
    }
  ],
  "default": {"provider": "<provider id>", "model": "<model id>"}
}

Choosing a model for one request

Add both query parameters to POST /v2/decide. Encode the values: a slash in a model id becomes %2F. Use values from your own GET /v2/models list.

Request
curl -X POST "https://director.eposyne.com/v2/decide?provider=<provider id>&model=<url-encoded model id>" \
  -H "Authorization: Bearer $EPOSYNE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @request.json
A 400 for a bad selection
{
  "detail": "Both provider and model are required.",
  "code": "invalid_selection",
  "field": "model"
}

If you choose nothing and no default is available, the call is a 503 with "code": "model_unavailable". Pick a pair from the list.

Setting the output-token cap

Each model has a default output-token cap, listed as max_tokens_default in GET /v2/models. Add max_tokens to POST /v2/decide to set it for one request, with or without a model choice:

Request
curl -X POST "https://director.eposyne.com/v2/decide?provider=groq&model=openai%2Fgpt-oss-120b&max_tokens=4096" \
  -H "Authorization: Bearer $EPOSYNE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @request.json
A 400 for a cap out of range
{
  "detail": "max_tokens must be an integer from 64 to 16384",
  "code": "invalid_max_tokens",
  "field": "max_tokens",
  "min": 64,
  "max": 16384
}

GET /v2/usage/me

Returns your account's spend for the current month. It needs the same key and does not count toward your request rate.

Request
curl https://director.eposyne.com/v2/usage/me \
  -H "Authorization: Bearer $EPOSYNE_API_KEY"
Response (example)
{
  "month": "2026-09",
  "spent_eur": 1.25,
  "cap_eur": 10,
  "remaining_eur": 8.75,
  "resets_at": "2026-10-01T00:00:00Z"
}
FieldMeaning
monthThe calendar month the figures cover, as YYYY-MM, in UTC.
spent_eurWhat decisions cost this month, in euro.
cap_eurThe monthly limit in euro, or null when there is none.
remaining_eurThe limit minus the spend, never below 0, or null without a limit.
resets_atWhen the month rolls over: the start of the next UTC month.

Ignore fields you do not recognize.

These figures come from Director's own record of the month. Read them after a decision. Do not subtract the rounded dollar headers from a euro balance. Your credit balance itself is on the credits page of your account.

The usage headers on a decision

A successful POST /v2/decide may carry these headers. They are present when the model backend reported usage, and a missing one is not an error.

HeaderMeaning
X-LLM-Provider, X-LLM-ModelThe pair that answered.
X-LLM-Prompt-TokensInput tokens.
X-LLM-Completion-TokensOutput tokens.
X-LLM-Total-TokensInput plus output tokens.
X-LLM-Cost-UsdCost in US dollars with six fractional digits. With validation on, it covers both model calls.
X-LLM-Max-TokensThe output-token cap the call ran with: your max_tokens, or the model's default.
X-LLM-Finish-ReasonWhy the model stopped: stop, length (it reached the cap), content_filter, or other.

Use the headers for per-call logging and tuning. Use GET /v2/usage/me for the account total.