Skip to content

Preview models

Preview models are models we open to selected organisations first. They run on the same API as every other model: the same base URL, the same API keys, the same credit.

How access works

  • Access is per organisation. Ask us at support@ethux.net and we turn it on for yours.
  • Every key in your organisation can then call the model within a few minutes, existing keys included: you need no new key. Turning access off works the same way.
  • Keys you create for your clients (as a reseller) cannot call preview models.
  • Preview models are not in GET /v1/models or in the Models and prices table. The console's Models page shows the ones your organisation has.
  • Without access the API answers 403.
  • Usage draws on your organisation's credit like any other model, and stops at €0 like the rest.

A preview model in a standard format is called like any model, with its id in model. One with its own format, like Clef Flash, has its own path.

Clef Flash

clef-flash answers questions about a text with probabilities: yes or no, one of several named options, or a point on a scale. Use it to route, triage or score text, such as support messages. It writes no text, so every answer is one of your options. Text only, up to 16K tokens. About the model itself: its model card.

curl https://api.ethux.net/v1/systemone \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "clef-flash",
    "state": "Our checkout started returning errors and orders are blocked.",
    "questions": {
      "outage": {"type": "noul", "instructions": "Is a service down?"},
      "team": {"type": "choice", "instructions": "Which team should handle the message?",
               "criteria": {"billing": "Payments or invoices", "technical": "Bugs or outages"}},
      "urgency": {"type": "score", "instructions": "How soon must we act?",
                  "criteria": ["Can wait", "This week", "Today"]}
    }
  }'

state is the text to judge. questions maps your own question ids to a question:

type criteria Answer fields
noul none noul: the probability that the answer is yes
choice Object, option id to description choice (the most likely option id), confidence, probabilities per option
score List of descriptions, lowest first score (the expected position, 0 is the first), confidence, legend, probabilities per option

The response has answers, keyed by your question ids, and usage.input_tokens. Per question, the probabilities add up to 1, so 1.6 on a three-step score lies between the second and the third step.

Spell it instructions

A question key with a typo is ignored without an error. The question id is then used as the question, and the answers look plausible but are not about what you meant.

Errors and limits

Status Meaning
400 The body is not a valid request; error says what is wrong
401 No key, or a key we do not know
403 Your organisation has no access to Clef Flash, or is out of credit
413 The body is over 1 MiB
503 Every worker stayed busy for 60 seconds; retry after a few seconds

A request with a full 16K-token text answers in a few seconds.

Billing

Billed per input token (your text and questions), at the price on the console's Models page. There are no output tokens. Ask all your questions about one text in one request: the text is then read, and billed, once.

GLM-OCR

glm-ocr reads one page image and returns what is on it: running text, a table or a formula. OpenAI chat format on POST /v1/chat/completions. About the model itself: its model card.

jq -n --rawfile img <(base64 < page.png | tr -d '\n') '{model: "glm-ocr", messages: [{role: "user", content: [
  {type: "image_url", image_url: {url: ("data:image/png;base64," + $img)}},
  {type: "text", text: "Text Recognition:"}]}]}' > request.json
curl https://api.ethux.net/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d @request.json

The text part is one of three prompts: Text Recognition:, Table Recognition: or Formula Recognition:. The answer is in choices[0].message.content.

  • Exactly one image per request, as a data:image/...;base64, URL. Image links (https://...) are refused: we do not fetch files for you.
  • The body is at most 20 MiB and the image at most 50 megapixels.
  • max_tokens is 8192 at most, and that is the default.
  • stream: true works, but the whole answer arrives in one chunk.
  • A dense A4 page takes up to about 40 seconds; a few lines take a few seconds.

Errors and limits

Status Meaning
400 The body is not a valid request, or does not hold exactly one data: image; error says what is wrong
401 No key, or a key we do not know
403 Your organisation has no access to GLM-OCR or is out of credit, or the request asks for zero data retention
413 The body is over 20 MiB
429 Four pages are already running or waiting; retry in a minute

Billing

Billed per token at the prices on the console's Models page. Input tokens include the image: a dense A4 page is about 2,800. Output tokens are the text it returns.