> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Execute AI Model

Receive real-time predictions or results generated by the chosen AI model.

<Note>
  External Documentation

  To learn more, visit the [Cloudflare documentation](https://developers.cloudflare.com/api/resources/ai/).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter           | Description                                                                                                                                                                          |
  | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | AI Model Type       | Choose the type of the model that you want to execute to fill the corresponding parameters.<br /><br />Ensure that the model type correctly corresponds to the specified model name. |
  | Account ID          | Your Cloudflare Account ID.                                                                                                                                                          |
  | Frequency Penalty   | Decreases the likelihood of the model repeating the same lines verbatim.                                                                                                             |
  | Guidance            | Controls how closely the generated image should adhere to the prompt - higher values make the image more aligned with the prompt.                                                    |
  | Height              | The height of the generated image in pixels.                                                                                                                                         |
  | Image               | An array of integers that represent the image data constrained to 8-bit unsigned integer values.                                                                                     |
  | Image               | Comma separated list of 8-bit unsigned integers that represent the image.                                                                                                            |
  | Image               | Separated list of integers that represent the image data constrained to 8-bit unsigned integer values.                                                                               |
  | Image               | Comma separated list of 8-bit unsigned integers that represent the image.                                                                                                            |
  | Image Base64        | A base64-encoded string of the input image (for use with image to image tasks).                                                                                                      |
  | Input Text          | The text that you want the model to summarize.                                                                                                                                       |
  | Language            | The language of speech (e.g. `en` for English `fr` for French etc.).                                                                                                                 |
  | Mask                | A Comma separated list of integers that represents mask image in 8-bit unsigned integer value.                                                                                       |
  | Max Length          | The maximum length of the generated summary in tokens.                                                                                                                               |
  | Max Tokens          | The maximum number of tokens to generate in the response.                                                                                                                            |
  | Model Name          | The name of the model to execute.<br /><br />For more information about the models see [cloudflare workers-ai models](https://developers.cloudflare.com/workers-ai/models/).         |
  | Negative Prompt     | Text describing elements to avoid in the generated image.                                                                                                                            |
  | Number of Steps     | The number of diffusion steps, higher values can improve quality but take longer.                                                                                                    |
  | Presence Penalty    | Increases the likelihood of the model introducing new topics.                                                                                                                        |
  | Prompt              | A text description of the image you want to generate.                                                                                                                                |
  | Prompt              | Text you wish to convert into speech.                                                                                                                                                |
  | Prompt              | The input text prompt for the model to generate a response.                                                                                                                          |
  | Source Language     | The language to translate from, for example 'en' for English, 'fr' for French.                                                                                                       |
  | Target Language     | The language to translate to, for example 'en' for English, 'fr' for French.                                                                                                         |
  | Text                | The text to translate.                                                                                                                                                               |
  | Text Classification | The text that you want to classify as positive or negative.                                                                                                                          |
  | Text To Embed       | A comma separated list of text's to be converted into embeddings by the AI model.                                                                                                    |
  | Width               | The width of the generated image in pixels.                                                                                                                                          |
</div>

## Example Output

```json theme={"dark"}
{
	"result": {
		"translated_text": "Test de traduction"
	},
	"success": true,
	"errors": [],
	"messages": []
}
```

## Workflow Library Example

[Execute Ai Model with Cloudflare and Send Results Via Email](https://library.blinkops.com/workflows/execute-ai-model-with-cloudflare-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/execute-ai-model-with-cloudflare-and-send-results-via-email/canvas" />
</div>
