run
Creates, updates, deletes, gets or lists a run resource.
Overview
| Name | run |
| Type | Resource |
| Id | cloudflare.ai.run |
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-awqText 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.6bSpeech to Text (3 models)
@cf/deepgram/flux@cf/deepgram/nova-3@cf/openai/whisper-large-v3-turboTranslation (3 models)
@cf/ai4bharat/indictrans2-en-indic-1B@cf/ai4bharat/nonomni-indictrans2-en-indic-1b@cf/meta/m2m100-1.2bSummarization (2 models)
@cf/facebook/bart-large-cnn@cf/facebook/nonomni-bart-large-cnnText 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.0Text to Speech (4 models)
@cf/deepgram/aura-1@cf/deepgram/aura-2-en@cf/deepgram/aura-2-es@cf/myshell-ai/melottsText Classification (2 models)
@cf/huggingface/distilbert-sst-2-int8@cf/huggingface/nonomni-distilbert-sst-2-int8Reranking (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:
- run
Model response
| Name | Datatype | Description |
|---|---|---|
data | array | Embedding vectors, one per input text. |
model | string | Echo of the model name, where reported. |
pooling | string | Pooling method used (cls or mean), where applicable. |
response | string | The generated text response from the model. |
shape | array | Dimensions of the returned embedding matrix. |
summary | string | The summarized text. |
text | string | The transcribed text. |
tool_calls | array | Tool call requests emitted by the model, if tools were provided. |
transcription_info | object | Model/language detail, where reported. |
translated_text | string | The translated text. |
usage | object | Token usage counts (prompt_tokens, completion_tokens, total_tokens). |
vtt | string | WebVTT formatted transcription, where reported. |
word_count | number | Number of words in the transcription, where reported. |
words | array | Per-word timing detail, where reported. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
run | select | account_id, model_name | 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. | |
nonomni_detr_resnet_50 | exec | account_id | queueRequest, tags | Runs inference on the @cf/facebook/nonomni-detr-resnet-50 model. |
nonomni_resnet_50 | exec | account_id | queueRequest, tags | Runs inference on the @cf/microsoft/nonomni-resnet-50 model. |
resnet_50 | exec | account_id | queueRequest, tags | Runs inference on the @cf/microsoft/resnet-50 model. |
whisper | exec | account_id | queueRequest, tags | Runs inference on the @cf/openai/whisper model. |
whisper_tiny_en | exec | account_id | queueRequest, tags | Runs 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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
model_name | string | |
queueRequest | string | |
tags | string |
SELECT examples
- run
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
- nonomni_detr_resnet_50
- nonomni_resnet_50
- resnet_50
- whisper
- whisper_tiny_en
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 }}'
;
Runs inference on the @cf/microsoft/nonomni-resnet-50 model.
EXEC cloudflare.ai.run.nonomni_resnet_50
@account_id='{{ account_id }}' --required,
@queueRequest='{{ queueRequest }}',
@tags='{{ tags }}'
;
Runs inference on the @cf/microsoft/resnet-50 model.
EXEC cloudflare.ai.run.resnet_50
@account_id='{{ account_id }}' --required,
@queueRequest='{{ queueRequest }}',
@tags='{{ tags }}'
;
Runs inference on the @cf/openai/whisper model.
EXEC cloudflare.ai.run.whisper
@account_id='{{ account_id }}' --required,
@queueRequest='{{ queueRequest }}',
@tags='{{ tags }}'
;
Runs inference on the @cf/openai/whisper-tiny-en model.
EXEC cloudflare.ai.run.whisper_tiny_en
@account_id='{{ account_id }}' --required,
@queueRequest='{{ queueRequest }}',
@tags='{{ tags }}'
;