Run a Workers AI model·续3

The generated audio in MP3 format, base64-encoded

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%202%20%3E%20(property)%20audio">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%202">Link to this property</a>

string

The generated audio in MP3 format

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%203">Link to this property</a>

<details>

<summary>

TextEmbeddings object {data, shape }

</summary>

data: optional array of array of number

Embeddings of the requested text values

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%204%20%3E%20(property)%20data">Link to this property</a>

shape: optional array of number

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%204%20%3E%20(property)%20shape">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%204">Link to this property</a>

<details>

<summary>

AutomaticSpeechRecognition object {text, vtt, word_count, words }

</summary>

text: string

The transcription

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%205%20%3E%20(property)%20text">Link to this property</a>

vtt: optional string

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%205%20%3E%20(property)%20vtt">Link to this property</a>

word_count: optional number

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%205%20%3E%20(property)%20word_count">Link to this property</a>

<details>

<summary>

words: optional array of object {end, start, word }

</summary>

end: optional number

The ending second when the word completes

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%205%20%3E%20(property)%20words%20%3E%20(items)%20%3E%20(property)%20end">Link to this property</a>

start: optional number

The second this word begins in the recording

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%205%20%3E%20(property)%20words%20%3E%20(items)%20%3E%20(property)%20start">Link to this property</a>

word: optional string

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%205%20%3E%20(property)%20words%20%3E%20(items)%20%3E%20(property)%20word">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%205%20%3E%20(property)%20words">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%205">Link to this property</a>

<details>

<summary>

ImageClassification = array of object {label, score }

</summary>

label: optional string

The predicted category or class for the input image based on analysis

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%206%20%3E%20(items)%20%3E%20(property)%20label">Link to this property</a>

score: optional number

A confidence value, between 0 and 1, indicating how certain the model is about the predicted label

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%206%20%3E%20(items)%20%3E%20(property)%20score">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%206">Link to this property</a>

<details>

<summary>

ObjectDetection = array of object {box, label, score }

An array of detected objects within the input image

</summary>

<details>

<summary>

box: optional object {xmax, xmin, ymax, ymin }

Coordinates defining the bounding box around the detected object

</summary>

xmax: optional number

The x-coordinate of the bottom-right corner of the bounding box

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%207%20%3E%20(items)%20%3E%20(property)%20box%20%3E%20(property)%20xmax">Link to this property</a>

xmin: optional number

The x-coordinate of the top-left corner of the bounding box

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%207%20%3E%20(items)%20%3E%20(property)%20box%20%3E%20(property)%20xmin">Link to this property</a>

ymax: optional number

The y-coordinate of the bottom-right corner of the bounding box

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%207%20%3E%20(items)%20%3E%20(property)%20box%20%3E%20(property)%20ymax">Link to this property</a>

ymin: optional number

The y-coordinate of the top-left corner of the bounding box

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%207%20%3E%20(items)%20%3E%20(property)%20box%20%3E%20(property)%20ymin">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%207%20%3E%20(items)%20%3E%20(property)%20box">Link to this property</a>

label: optional string

The class label or name of the detected object

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%207%20%3E%20(items)%20%3E%20(property)%20label">Link to this property</a>

score: optional number

Confidence score indicating the likelihood that the detection is correct

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%207%20%3E%20(items)%20%3E%20(property)%20score">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%207">Link to this property</a>

<details>

<summary>

object {response, tool_calls, usage }

</summary>

response: string

The generated text response from the model

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%208%20%3E%20(property)%20response">Link to this property</a>

<details>

<summary>

tool_calls: optional array of object {arguments, name }

An array of tool calls requests made during the response generation

</summary>

arguments: optional unknown

The arguments passed to be passed to the tool call request

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%208%20%3E%20(property)%20tool_calls%20%3E%20(items)%20%3E%20(property)%20arguments">Link to this property</a>

name: optional string

The name of the tool to be called

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%208%20%3E%20(property)%20tool_calls%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%208%20%3E%20(property)%20tool_calls">Link to this property</a>

<details>

<summary>

usage: optional object {completion_tokens, prompt_tokens, total_tokens }

Usage statistics for the inference request

</summary>

completion_tokens: optional number

Total number of tokens in output

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%208%20%3E%20(property)%20usage%20%3E%20(property)%20completion_tokens">Link to this property</a>

prompt_tokens: optional number

Total number of tokens in input

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%208%20%3E%20(property)%20usage%20%3E%20(property)%20prompt_tokens">Link to this property</a>

total_tokens: optional number

Total number of input and output tokens

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%208%20%3E%20(property)%20usage%20%3E%20(property)%20total_tokens">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%208%20%3E%20(property)%20usage">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%208">Link to this property</a>

string

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%209">Link to this property</a>

<details>

<summary>

Translation object {translated_text }

</summary>

translated_text: optional string

The translated text in the target language

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2010%20%3E%20(property)%20translated_text">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2010">Link to this property</a>

<details>

<summary>

Summarization object {summary }

</summary>

summary: optional string

The summarized version of the input text

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2011%20%3E%20(property)%20summary">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2011">Link to this property</a>

<details>

<summary>

ImageToText object {description }

</summary>

description: optional string

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2012%20%3E%20(property)%20description">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2012">Link to this property</a>

<details>

<summary>

ImageTextToText object {description }

</summary>

description: optional string

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2013%20%3E%20(property)%20description">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2013">Link to this property</a>

<details>

<summary>

MultimodalEmbeddings object {data, shape }

</summary>

data: optional array of array of number

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2014%20%3E%20(property)%20data">Link to this property</a>

shape: optional array of number

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2014%20%3E%20(property)%20shape">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(method)%20run%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2014">Link to this property</a>

</details>

Link to this property

Run a Workers AI model

HTTP

HTTPTypeScriptPythonGoTerraform

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/ai/run/$MODEL_NAME \
    -X POST \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"

200 example

{
  "result": [
    {
      "label": "label",
      "score": 0
    }
  ]
}
Returns Examples

200 example

{
  "result": [
    {
      "label": "label",
      "score": 0
    }
  ]
}


description: Review recent changes to Cloudflare Workers AI. title: Changelog image: https://developers.cloudflare.com/workers-ai/changelog/og.png?v=1d28cd0448d2966e


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/workers-ai/llms.txt
Use this file to discover all available pages before exploring further.