Skip to main content

run

Creates, updates, deletes, gets or lists a run resource.

Overview

Namerun
TypeResource
Idcloudflare.ai.run

Supported models

Set model_name to one of the following models:

Text Generation (55 models)
@cf/aisingapore/gemma-sea-lion-v4-27b-it
@cf/deepseek-ai/deepseek-math-7b-instruct
@cf/deepseek-ai/deepseek-r1-distill-qwen-32b
@cf/defog/sqlcoder-7b-2
@cf/fblgit/una-cybertron-7b-v2-bf16
@cf/google/gemma-2b-it-lora
@cf/google/gemma-3-12b-it
@cf/google/gemma-7b-it-lora
@cf/ibm-granite/granite-4.0-h-micro
@cf/meta-llama/llama-2-7b-chat-hf-lora
@cf/meta/llama-2-7b-chat-fp16
@cf/meta/llama-2-7b-chat-int8
@cf/meta/llama-3-8b-instruct
@cf/meta/llama-3-8b-instruct-awq
@cf/meta/llama-3.1-70b-instruct-fp8-fast
@cf/meta/llama-3.1-8b-instruct-awq
@cf/meta/llama-3.1-8b-instruct-fp8
@cf/meta/llama-3.1-8b-instruct-fp8-fast
@cf/meta/llama-3.2-11b-vision-instruct
@cf/meta/llama-3.2-1b-instruct
@cf/meta/llama-3.2-3b-instruct
@cf/meta/llama-3.3-70b-instruct-fp8-fast
@cf/meta/llama-4-scout-17b-16e-instruct
@cf/meta/llama-guard-3-8b
@cf/microsoft/phi-2
@cf/mistral/mistral-7b-instruct-v0.1
@cf/mistral/mistral-7b-instruct-v0.2-lora
@cf/mistralai/mistral-small-3.1-24b-instruct
@cf/moonshotai/kimi-k2.5
@cf/nvidia/nemotron-3-120b-a12b
@cf/openai/gpt-oss-120b
@cf/openai/gpt-oss-20b
@cf/openchat/openchat-3.5-0106
@cf/qwen/qwen1.5-0.5b-chat
@cf/qwen/qwen1.5-1.8b-chat
@cf/qwen/qwen1.5-14b-chat-awq
@cf/qwen/qwen1.5-7b-chat-awq
@cf/qwen/qwen2.5-coder-32b-instruct
@cf/qwen/qwen3-30b-a3b-fp8
@cf/qwen/qwq-32b
@cf/thebloke/discolm-german-7b-v1-awq
@cf/tiiuae/falcon-7b-instruct
@cf/tinyllama/tinyllama-1.1b-chat-v1.0
@cf/zai-org/glm-4.7-flash
@hf/google/gemma-7b-it
@hf/mistral/mistral-7b-instruct-v0.2
@hf/nexusflow/starling-lm-7b-beta
@hf/nousresearch/hermes-2-pro-mistral-7b
@hf/thebloke/deepseek-coder-6.7b-base-awq
@hf/thebloke/deepseek-coder-6.7b-instruct-awq
@hf/thebloke/llama-2-13b-chat-awq
@hf/thebloke/mistral-7b-instruct-v0.1-awq
@hf/thebloke/neural-chat-7b-v3-1-awq
@hf/thebloke/openhermes-2.5-mistral-7b-awq
@hf/thebloke/zephyr-7b-beta-awq
Text Embeddings (12 models)
@cf/baai/bge-base-en-v1.5
@cf/baai/bge-large-en-v1.5
@cf/baai/bge-m3
@cf/baai/bge-small-en-v1.5
@cf/baai/nonomni-bge-base-en-v1.5
@cf/baai/nonomni-bge-large-en-v1.5
@cf/baai/nonomni-bge-m3
@cf/baai/nonomni-bge-small-en-v1.5
@cf/google/embeddinggemma-300m
@cf/google/nonomni-embeddinggemma-300m
@cf/pfnet/plamo-embedding-1b
@cf/qwen/qwen3-embedding-0.6b
Speech to Text (3 models)
@cf/deepgram/flux
@cf/deepgram/nova-3
@cf/openai/whisper-large-v3-turbo
Translation (3 models)
@cf/ai4bharat/indictrans2-en-indic-1B
@cf/ai4bharat/nonomni-indictrans2-en-indic-1b
@cf/meta/m2m100-1.2b
Summarization (2 models)
@cf/facebook/bart-large-cnn
@cf/facebook/nonomni-bart-large-cnn
Text to Image (11 models)
@cf/black-forest-labs/flux-1-schnell
@cf/black-forest-labs/flux-2-dev
@cf/black-forest-labs/flux-2-klein-4b
@cf/black-forest-labs/flux-2-klein-9b
@cf/bytedance/stable-diffusion-xl-lightning
@cf/leonardo/lucid-origin
@cf/leonardo/phoenix-1.0
@cf/lykon/dreamshaper-8-lcm
@cf/runwayml/stable-diffusion-v1-5-img2img
@cf/runwayml/stable-diffusion-v1-5-inpainting
@cf/stabilityai/stable-diffusion-xl-base-1.0
Text to Speech (4 models)
@cf/deepgram/aura-1
@cf/deepgram/aura-2-en
@cf/deepgram/aura-2-es
@cf/myshell-ai/melotts
Text Classification (2 models)
@cf/huggingface/distilbert-sst-2-int8
@cf/huggingface/nonomni-distilbert-sst-2-int8
Reranking (1 model)
@cf/baai/bge-reranker-base

The task-family resources above give these models typed result columns - prefer them over run where one exists. Binary-input models (@cf/facebook/nonomni-detr-resnet-50, @cf/microsoft/nonomni-resnet-50, @cf/microsoft/resnet-50, @cf/openai/whisper, @cf/openai/whisper-tiny-en) take a raw request body and are exposed as exec methods on this resource instead of SELECT.

Fields

The following fields are returned by SELECT queries:

Model response

NameDatatypeDescription
dataarrayEmbedding vectors, one per input text.
modelstringEcho of the model name, where reported.
poolingstringPooling method used (cls or mean), where applicable.
responsestringThe generated text response from the model.
shapearrayDimensions of the returned embedding matrix.
summarystringThe summarized text.
textstringThe transcribed text.
tool_callsarrayTool call requests emitted by the model, if tools were provided.
transcription_infoobjectModel/language detail, where reported.
translated_textstringThe translated text.
usageobjectToken usage counts (prompt_tokens, completion_tokens, total_tokens).
vttstringWebVTT formatted transcription, where reported.
word_countnumberNumber of words in the transcription, where reported.
wordsarrayPer-word timing detail, where reported.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
runselectaccount_id, model_nameThis endpoint provides users with the capability to run specific AI models on-demand. By submitting the required input data, users can receive real-time predictions or results generated by the chosen AI model. The endpoint supports various AI model types, ensuring flexibility and adaptability for diverse use cases. Model specific inputs available in Cloudflare Docs.
nonomni_detr_resnet_50execaccount_idqueueRequest, tagsRuns inference on the @cf/facebook/nonomni-detr-resnet-50 model.
nonomni_resnet_50execaccount_idqueueRequest, tagsRuns inference on the @cf/microsoft/nonomni-resnet-50 model.
resnet_50execaccount_idqueueRequest, tagsRuns inference on the @cf/microsoft/resnet-50 model.
whisperexecaccount_idqueueRequest, tagsRuns inference on the @cf/openai/whisper model.
whisper_tiny_enexecaccount_idqueueRequest, tagsRuns inference on the @cf/openai/whisper-tiny-en model.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
model_namestring
queueRequeststring
tagsstring

SELECT examples

This endpoint provides users with the capability to run specific AI models on-demand. By submitting the required input data, users can receive real-time predictions or results generated by the chosen AI model. The endpoint supports various AI model types, ensuring flexibility and adaptability for diverse use cases. Model specific inputs available in Cloudflare Docs.

SELECT
response,
usage,
data,
shape,
text,
translated_text,
summary
FROM cloudflare.ai.run
WHERE account_id = '{{ account_id }}' -- required
AND model_name = '{{ model_name }}' -- required
AND prompt = '{{ prompt }}' -- model input
;

Lifecycle Methods

Runs inference on the @cf/facebook/nonomni-detr-resnet-50 model.

EXEC cloudflare.ai.run.nonomni_detr_resnet_50
@account_id='{{ account_id }}' --required,
@queueRequest='{{ queueRequest }}',
@tags='{{ tags }}'
;