Cloudflare: Clef Omni API Reference

About

Cloudflare Clef Omni evaluates text, structured data, images, audio, and video using Noul, Choice, and Score questions and returns typed decisions with probabilities. Infron routes synchronous JSON requests to Cloudflare Workers AI using clef-omni. The hosted context window is 64,000 tokens, including media and questions, with 1–64 questions per request. Media and questions that exceed the context limit cause an upstream error; text state is truncated by Cloudflare to fit the remaining space. Streaming and task polling are not part of this model API.

1. Calling the API

Setup your API Key

To begin using Infron, create an account and generate your API Key.

export INFRON_KEY="YOUR_API_KEY"

Submit a request

Send JSON to POST https://llm.onerouter.pro/v1/decisions using your Infron API key. The following request bodies were actually sent online on 2026-10-28. Only the authentication value is replaced with $INFRON_KEY; JSON whitespace is formatted for readability. The embedded PNG/MP4 bytes are the small samples used in those calls, so you can run these examples with your own API key.

Image request — Data URL

curl --request POST "https://llm.onerouter.pro/v1/decisions" \
  --header "Authorization: Bearer $INFRON_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "cloudflare/clef-omni",
  "state": "Inspect the supplied image.",
  "images": [
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAAACXBIWXMAAAABAAAAAQBPJcTWAAAC00lEQVR4nO3TsQ0EMQzAsA/w+6/sGyJFYIicQI3OzPyg6v86AF4yAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDS1g8w57xOSDszrxOurB8AbhiANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGnrBzgzrxNYbP0AcMMApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUj7AIpSC/qGa+ppAAAAAElFTkSuQmCC"
  ],
  "questions": {
    "square_color": {
      "type": "choice",
      "instructions": "What is the color of the square in the image?",
      "criteria": {
        "red": "Red",
        "blue": "Blue",
        "green": "Green"
      }
    }
  },
  "provider": {
    "only": [
      "cloudflare"
    ],
    "allow_fallbacks": false,
    "service_tier": "standard"
  },
  "usage": {
    "include": true
  }
}'

Video request — Data URL

curl --request POST "https://llm.onerouter.pro/v1/decisions" \
  --header "Authorization: Bearer $INFRON_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "cloudflare/clef-omni",
  "state": "Inspect the supplied video.",
  "videos": [
    "data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAODbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAAB9AAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAq10cmFrAAAAXHRraG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FD3HxMzEgu2HfFqC4XkCFtYURrXil5JaL2tjaB0mJf02fF2608ZtXoK0grCaID1VAAAAG0GaIWxBD/61KqbnIrSJobwQmtBbROVYD4MJkAAAACtBmkI8IZMphBD//rUqpxaTEr2bcxfbzJLTgILv31QERJjdYsHMhCe9W1HBAAAAKUGaY0nhDyZTAgn//taMv2zaH2Kr2Cp82P5kpiAS+e/koT/UDuIWOVhAAAAAJ0Gah0nhDyZTAgh//rUqnZj5kqk8wSQIROscALAHvY+dse0lt/vWUQAAAB5BnqVFETwR/wCIl+VwZwjdkghAXNE87cqDKbGN2ekAAAAiAZ7EdEEPAKh0CUWoBuNpyWpKbxG2HJxKe5058FrrB0/OkwAAACIBnsZqQQ8Ak8aBxcsddUqjl5PhzNt8Kv42I9GuNqvolJzZ"
  ],
  "questions": {
    "red_square_visible": {
      "type": "noul",
      "instructions": "Is a red square visible in the video?"
    }
  },
  "provider": {
    "only": [
      "cloudflare"
    ],
    "allow_fallbacks": false,
    "service_tier": "standard"
  },
  "usage": {
    "include": true
  }
}'

Response

The responses below were captured from those online requests. The Infron JSON response is shown first, followed by the original Cloudflare JSON body recorded for the same request. Request IDs, answers, token counts, and costs are actual observations; a new call can return different values.

Image response from Infron

{
  "answers": {
    "square_color": {
      "type": "choice",
      "choice": "red",
      "probabilities": {
        "blue": 0.0204,
        "green": 0.021,
        "red": 0.9586
      },
      "confidence": 0.8796
    }
  },
  "cost": 0.000032,
  "cost_details": {
    "audio_cost": 0,
    "byok_cost": 0,
    "completion_cost": 0,
    "discount_rate": 1,
    "image_cost": 0,
    "is_byok": false,
    "native_web_search_cost": 0,
    "plugin_web_search_cost": 0,
    "prompt_cache_read_cost": 0,
    "prompt_cache_write_1_h": 0,
    "prompt_cache_write_5_min": 0,
    "prompt_cache_write_cost": 0,
    "prompt_cost": 0.0000324,
    "reasoning_cost": 0,
    "tools_cost": 0,
    "video_cost": 0
  },
  "id": "202610280342057663315238oeJhFoE",
  "model": "cloudflare/clef-omni",
  "provider": "cloudflare",
  "request_id": "202610280342057663315238oeJhFoE",
  "service_tier": "standard",
  "usage": {
    "input_tokens": 216,
    "output_tokens": 0
  }
}

Cloudflare upstream response for the same image request

This is the upstream body used to produce the Infron response above.

{
  "errors": [],
  "messages": [],
  "result": {
    "answers": {
      "square_color": {
        "choice": "red",
        "confidence": 0.8796,
        "probabilities": {
          "blue": 0.0204,
          "green": 0.021,
          "red": 0.9586
        },
        "type": "choice"
      }
    },
    "model": "clef-omni",
    "usage": {
      "input_tokens": 216,
      "output_tokens": 0
    }
  },
  "success": true
}

Video response from Infron

{
  "answers": {
    "red_square_visible": {
      "type": "noul",
      "noul": 0.9016
    }
  },
  "cost": 0.000066,
  "cost_details": {
    "audio_cost": 0,
    "byok_cost": 0,
    "completion_cost": 0,
    "discount_rate": 1,
    "image_cost": 0,
    "is_byok": false,
    "native_web_search_cost": 0,
    "plugin_web_search_cost": 0,
    "prompt_cache_read_cost": 0,
    "prompt_cache_write_1_h": 0,
    "prompt_cache_write_5_min": 0,
    "prompt_cache_write_cost": 0,
    "prompt_cost": 0.0000657,
    "reasoning_cost": 0,
    "tools_cost": 0,
    "video_cost": 0
  },
  "id": "20261028034206383643651tiv102OF",
  "model": "cloudflare/clef-omni",
  "provider": "cloudflare",
  "request_id": "20261028034206383643651tiv102OF",
  "service_tier": "standard",
  "usage": {
    "input_tokens": 438,
    "output_tokens": 0
  }
}

Cloudflare upstream response for the same video request

This is the upstream body used to produce the Infron response above.

{
  "errors": [],
  "messages": [],
  "result": {
    "answers": {
      "red_square_visible": {
        "noul": 0.9016,
        "type": "noul"
      }
    },
    "model": "clef-omni",
    "usage": {
      "input_tokens": 438,
      "output_tokens": 0
    }
  },
  "success": true
}

Routing and usage

Every complete request example above includes provider.only=["cloudflare"], provider.allow_fallbacks=false, provider.service_tier="standard", and usage.include=true inside the request body. These platform fields select the route and request cost details; Infron handles them and sends only the model's media, state, and questions fields to Cloudflare. Actual token counts are always returned. usage.include=true also returns the top-level cost and cost_details shown in the captured responses.

Errors

Read error.message and retain the request ID. Correct invalid inputs before retrying. Authentication, account quotas, and media-content validation are enforced by Cloudflare.

2. Schema

Input

ParameterTypeRequiredDefaultRangeDescription
modelstringYes--cloudflare/clef-omniPublic model ID; upstream selector is clef-omni.
statestring / object / arrayYes--Non-nullShared content; long text is truncated by Cloudflare to fit available context.
questionsobjectYes--1–64 entriesQuestion IDs use letters, digits, _, ., -, with at most 100 characters.
questions.<id>.typestringYes--noul, choice, scoreQuestion type.
questions.<id>.instructionsstring / object / arrayYes--Nonempty for stringsWhat the model should evaluate.
questions.<id>.criteriaobject / arrayFor choice and score--See Question typesTyped answer options or rubric.
imagesarrayNo--0–4 imagesEmbedded PNG, JPEG, or WebP; remote URLs are not accepted.
audioarrayNo--0–4 clipsEmbedded audio; see Media inputs.
videosarrayNo--0–2 clipsEmbedded video; see Media inputs.
providerobjectNo----Platform routing options.
usage.includebooleanNofalsetrue, falseInclude platform cost details.

Question types

Noul: yes/no probability

instructions is required. Optional criteria is an object with optional true and false descriptions. The answer has type and noul, a probability from 0 to 1.

Choice: classification

criteria is required: 2–255 options, each identified by a nonempty string. Descriptions may be strings, objects, arrays, or null. Answers contain choice, probabilities, and confidence.

Score: ordered rating

criteria is required: an ordered array of 2–10 string/object/array level descriptions. Levels start at 0. Answers contain a probability-weighted score, legend, probabilities, and confidence.

Media inputs

The complete requests above show images and videos containing real embedded Data URLs. An image can also be an object with content_type and base64; that object's base64 value contains only the encoded bytes, without a Data URL prefix. Images are limited to 4 MiB decoded and 16 megapixels each, and 8 MiB decoded in total. Image content types are image/png, image/jpeg, and image/webp. Remote URLs are not downloaded. Media is passed to Cloudflare for content, dimension, duration, aggregate-size, and context validation.

Audio supports WAV and MP3: at most 4 clips, each at most 8 MiB decoded and 300 seconds. Video supports MP4 and WebM: at most 2 clips, each at most 16 MiB decoded and 60 seconds, sampled at 2 frames per second. Audio and video together may total at most 16 MiB decoded. The video soundtrack is processed with its frames when every supplied video has a soundtrack. Use an audio/* or video/* data URL, or the same content_type/base64 object format.

Create image and video Data URLs from local files

To use your own media, encode the file bytes with this standard-library Python example. Set images[0] to image_url or videos[0] to video_url in the complete request above. The value already includes its MIME prefix.

import base64
from pathlib import Path

image_url = "data:image/png;base64," + base64.b64encode(
    Path("image.png").read_bytes()
).decode("ascii")

video_url = "data:video/mp4;base64," + base64.b64encode(
    Path("video.mp4").read_bytes()
).decode("ascii")

For JPEG or WebP, use data:image/jpeg;base64, or data:image/webp;base64,. For WebM, use data:video/webm;base64,. The MIME type must match the file bytes; changing the prefix does not convert a file. HTTP/HTTPS media links are not accepted.

Output

ParameterTypeRangeDescription
id, request_idstring--Platform request ID.
modelstring--Public model ID.
provider, service_tierstring--Selected route.
answersobjectRequest question IDsTyped answers from Cloudflare.
answers.<id>.typestringnoul, choice, scoreAnswer type.
answers.<id>.noulnumber0–1Yes probability.
answers.<id>.choicestringChoice keysSelected option.
answers.<id>.scorenumber0 to levels minus 1Probability-weighted level.
answers.<id>.confidencenumber0–1Choice/Score confidence.
answers.<id>.probabilitiesobjectValues 0–1Probability distribution.
answers.<id>.legendobject--Score level descriptions.
usage.input_tokens, usage.output_tokensintegerNon-negativeActual upstream usage; a free output rate does not replace the actual count.
costnumberUSDCharge details when requested.
cost_detailsobject--Billing breakdown when requested.

3. Detailed Pricing

ModelBilling unitInput priceOutput price
Cloudflare Clef OmniPer 1 million tokens$0.15Free

Media input is included in Cloudflare's reported input tokens at the same input rate, with no separate image, audio, or video surcharge. The upstream account has a shared daily free allocation of 10,000 Neurons. On Workers Paid, usage above that allocation is charged; Workers Free requires an upgrade to continue above its allocation. This account-level benefit does not set the model's list price to zero or establish an Infron free allowance. Platform billing precision and account rates still apply.

Sources: Cloudflare model, input schema, output schema, and pricing.