---
title: AI
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# AI

##### [Run a Workers AI model](https://developers.cloudflare.com/api/python/resources/ai/methods/run)

ai.run(strmodel\_name, AIRunParams\*\*kwargs) -> [AIRunResponse](<https://developers.cloudflare.com/api/python/resources/ai#(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)>)

POST/accounts/{account\_id}/ai/run/{model\_name}

##### ModelsExpand Collapse

<details>

<summary>

<a href="https://developers.cloudflare.com/api/python/resources/ai#(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)">AIRunResponse</a>

An array of classification results for the input text

</summary>

One of the following:

<details>

<summary>

List\[TextClassification]

An array of classification results for the input text

</summary>

label: Optional\[str]

The classification label assigned to the text (e.g., ‘POSITIVE’ or ‘NEGATIVE’)

<a href="#(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(items)%20%3E%20(property)%20label">Link to this property</a>

score: Optional\[float]

Confidence score indicating the likelihood that the text belongs to the specified label

<a href="#(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(items)%20%3E%20(property)%20score">Link to this property</a>

</details>

<a href="#(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%200">Link to this property</a>

object

The generated image in PNG format

<a href="#(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%201">Link to this property</a>

<details>

<summary>

class Audio: …

</summary>

audio: Optional\[str]

The generated audio in MP3 format, base64-encoded

<a href="#(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(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%202">Link to this property</a>

object

The generated audio in MP3 format

<a href="#(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>

class TextEmbeddings: …

</summary>

data: Optional\[List\[List\[float]]]

Embeddings of the requested text values

<a href="#(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\[List\[float]]

<a href="#(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(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%204">Link to this property</a>

<details>

<summary>

class AutomaticSpeechRecognition: …

</summary>

text: str

The transcription

<a href="#(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\[str]

<a href="#(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\[float]

<a href="#(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\[List\[AutomaticSpeechRecognitionWord]]

</summary>

end: Optional\[float]

The ending second when the word completes

<a href="#(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\[float]

The second this word begins in the recording

<a href="#(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\[str]

<a href="#(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(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(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%205">Link to this property</a>

<details>

<summary>

List\[ImageClassification]

</summary>

label: Optional\[str]

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

<a href="#(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\[float]

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

<a href="#(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(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%206">Link to this property</a>

<details>

<summary>

List\[ObjectDetection]

An array of detected objects within the input image

</summary>

<details>

<summary>

box: Optional\[ObjectDetectionBox]

Coordinates defining the bounding box around the detected object

</summary>

xmax: Optional\[float]

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

<a href="#(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\[float]

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

<a href="#(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\[float]

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

<a href="#(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\[float]

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

<a href="#(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(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\[str]

The class label or name of the detected object

<a href="#(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\[float]

Confidence score indicating the likelihood that the detection is correct

<a href="#(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(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%207">Link to this property</a>

<details>

<summary>

class UnionMember8: …

</summary>

response: str

The generated text response from the model

<a href="#(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\[List\[UnionMember8ToolCall]]

An array of tool calls requests made during the response generation

</summary>

arguments: Optional\[object]

The arguments passed to be passed to the tool call request

<a href="#(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\[str]

The name of the tool to be called

<a href="#(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(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\[UnionMember8Usage]

Usage statistics for the inference request

</summary>

completion\_tokens: Optional\[float]

Total number of tokens in output

<a href="#(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\[float]

Total number of tokens in input

<a href="#(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\[float]

Total number of input and output tokens

<a href="#(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(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(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%208">Link to this property</a>

object

<a href="#(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>

class Translation: …

</summary>

translated\_text: Optional\[str]

The translated text in the target language

<a href="#(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(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2010">Link to this property</a>

<details>

<summary>

class Summarization: …

</summary>

summary: Optional\[str]

The summarized version of the input text

<a href="#(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(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2011">Link to this property</a>

<details>

<summary>

class ImageToText: …

</summary>

description: Optional\[str]

<a href="#(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(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2012">Link to this property</a>

<details>

<summary>

class ImageTextToText: …

</summary>

description: Optional\[str]

<a href="#(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(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2013">Link to this property</a>

<details>

<summary>

class MultimodalEmbeddings: …

</summary>

data: Optional\[List\[List\[float]]]

<a href="#(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\[List\[float]]

<a href="#(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(model)%20ai_run_response%20%3E%20(schema)%20%3E%20(variant)%2014">Link to this property</a>

</details>

[Link to this property](<#(resource)%20ai%20%3E%20(model)%20ai_run_response%20%3E%20(schema)>)

#### AIFinetunes

##### [List Finetunes](https://developers.cloudflare.com/api/python/resources/ai/subresources/finetunes/methods/list)

ai.finetunes.list(FinetuneListParams\*\*kwargs) -> [FinetuneListResponse](<https://developers.cloudflare.com/api/python/resources/ai#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_list_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/ai/finetunes

##### [Create a new Finetune](https://developers.cloudflare.com/api/python/resources/ai/subresources/finetunes/methods/create)

ai.finetunes.create(FinetuneCreateParams\*\*kwargs) -> [FinetuneCreateResponse](<https://developers.cloudflare.com/api/python/resources/ai#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_create_response%20%3E%20(schema)>)

POST/accounts/{account\_id}/ai/finetunes

##### ModelsExpand Collapse

<details>

<summary>

class FinetuneListResponse: …

</summary>

id: str

formatuuid

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_list_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

created\_at: datetime

formatdate-time

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_list_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

model: str

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_list_response%20%3E%20(schema)%20%3E%20(property)%20model">Link to this property</a>

modified\_at: datetime

formatdate-time

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_list_response%20%3E%20(schema)%20%3E%20(property)%20modified_at">Link to this property</a>

name: str

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_list_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

description: Optional\[str]

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_list_response%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

</details>

[Link to this property](<#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_list_response%20%3E%20(schema)>)

<details>

<summary>

class FinetuneCreateResponse: …

</summary>

id: str

formatuuid

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_create_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

created\_at: datetime

formatdate-time

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_create_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

model: str

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_create_response%20%3E%20(schema)%20%3E%20(property)%20model">Link to this property</a>

modified\_at: datetime

formatdate-time

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_create_response%20%3E%20(schema)%20%3E%20(property)%20modified_at">Link to this property</a>

name: str

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_create_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

public: bool

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_create_response%20%3E%20(schema)%20%3E%20(property)%20public">Link to this property</a>

description: Optional\[str]

<a href="#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_create_response%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

</details>

[Link to this property](<#(resource)%20ai.finetunes%20%3E%20(model)%20finetune_create_response%20%3E%20(schema)>)

#### AIFinetunesAssets

##### [Upload a Finetune Asset](https://developers.cloudflare.com/api/python/resources/ai/subresources/finetunes/subresources/assets/methods/create)

ai.finetunes.assets.create(strfinetune\_id, AssetCreateParams\*\*kwargs) -> [AssetCreateResponse](<https://developers.cloudflare.com/api/python/resources/ai#(resource)%20ai.finetunes.assets%20%3E%20(model)%20asset_create_response%20%3E%20(schema)>)

POST/accounts/{account\_id}/ai/finetunes/{finetune\_id}/finetune-assets

##### ModelsExpand Collapse

<details>

<summary>

class AssetCreateResponse: …

</summary>

success: bool

<a href="#(resource)%20ai.finetunes.assets%20%3E%20(model)%20asset_create_response%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

[Link to this property](<#(resource)%20ai.finetunes.assets%20%3E%20(model)%20asset_create_response%20%3E%20(schema)>)

#### AIFinetunesPublic

##### [List Public Finetunes](https://developers.cloudflare.com/api/python/resources/ai/subresources/finetunes/subresources/public/methods/list)

ai.finetunes.public.list(PublicListParams\*\*kwargs) -> SyncSinglePage\[[PublicListResponse](<https://developers.cloudflare.com/api/python/resources/ai#(resource)%20ai.finetunes.public%20%3E%20(model)%20public_list_response%20%3E%20(schema)>)]

GET/accounts/{account\_id}/ai/finetunes/public

##### ModelsExpand Collapse

<details>

<summary>

class PublicListResponse: …

</summary>

id: str

formatuuid

<a href="#(resource)%20ai.finetunes.public%20%3E%20(model)%20public_list_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

created\_at: datetime

formatdate-time

<a href="#(resource)%20ai.finetunes.public%20%3E%20(model)%20public_list_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

model: str

<a href="#(resource)%20ai.finetunes.public%20%3E%20(model)%20public_list_response%20%3E%20(schema)%20%3E%20(property)%20model">Link to this property</a>

modified\_at: datetime

formatdate-time

<a href="#(resource)%20ai.finetunes.public%20%3E%20(model)%20public_list_response%20%3E%20(schema)%20%3E%20(property)%20modified_at">Link to this property</a>

name: str

<a href="#(resource)%20ai.finetunes.public%20%3E%20(model)%20public_list_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

public: bool

<a href="#(resource)%20ai.finetunes.public%20%3E%20(model)%20public_list_response%20%3E%20(schema)%20%3E%20(property)%20public">Link to this property</a>

description: Optional\[str]

<a href="#(resource)%20ai.finetunes.public%20%3E%20(model)%20public_list_response%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

</details>

[Link to this property](<#(resource)%20ai.finetunes.public%20%3E%20(model)%20public_list_response%20%3E%20(schema)>)

#### AIAuthors

##### [Author Search](https://developers.cloudflare.com/api/python/resources/ai/subresources/authors/methods/list)

ai.authors.list(AuthorListParams\*\*kwargs) -> SyncSinglePage\[object]

GET/accounts/{account\_id}/ai/authors/search

#### AITasks

##### [Task Search](https://developers.cloudflare.com/api/python/resources/ai/subresources/tasks/methods/list)

ai.tasks.list(TaskListParams\*\*kwargs) -> SyncSinglePage\[object]

GET/accounts/{account\_id}/ai/tasks/search

#### AIModels

##### [Model Search](https://developers.cloudflare.com/api/python/resources/ai/subresources/models/methods/list)

ai.models.list(ModelListParams\*\*kwargs) -> SyncV4PagePaginationArray\[object]

GET/accounts/{account\_id}/ai/models/search

#### AIModelsSchema

##### [Get an AI model's input and output schemas](https://developers.cloudflare.com/api/python/resources/ai/subresources/models/subresources/schema/methods/get)

ai.models.schema.get(SchemaGetParams\*\*kwargs) -> [SchemaGetResponse](<https://developers.cloudflare.com/api/python/resources/ai#(resource)%20ai.models.schema%20%3E%20(model)%20schema_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/ai/models/schema

##### ModelsExpand Collapse

<details>

<summary>

class SchemaGetResponse: …

</summary>

<details>

<summary>

input: Input

</summary>

additional\_properties: bool

<a href="#(resource)%20ai.models.schema%20%3E%20(model)%20schema_get_response%20%3E%20(schema)%20%3E%20(property)%20input%20%3E%20(property)%20additionalProperties">Link to this property</a>

description: str

<a href="#(resource)%20ai.models.schema%20%3E%20(model)%20schema_get_response%20%3E%20(schema)%20%3E%20(property)%20input%20%3E%20(property)%20description">Link to this property</a>

type: str

<a href="#(resource)%20ai.models.schema%20%3E%20(model)%20schema_get_response%20%3E%20(schema)%20%3E%20(property)%20input%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20ai.models.schema%20%3E%20(model)%20schema_get_response%20%3E%20(schema)%20%3E%20(property)%20input">Link to this property</a>

<details>

<summary>

output: Output

</summary>

additional\_properties: bool

<a href="#(resource)%20ai.models.schema%20%3E%20(model)%20schema_get_response%20%3E%20(schema)%20%3E%20(property)%20output%20%3E%20(property)%20additionalProperties">Link to this property</a>

description: str

<a href="#(resource)%20ai.models.schema%20%3E%20(model)%20schema_get_response%20%3E%20(schema)%20%3E%20(property)%20output%20%3E%20(property)%20description">Link to this property</a>

type: str

<a href="#(resource)%20ai.models.schema%20%3E%20(model)%20schema_get_response%20%3E%20(schema)%20%3E%20(property)%20output%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20ai.models.schema%20%3E%20(model)%20schema_get_response%20%3E%20(schema)%20%3E%20(property)%20output">Link to this property</a>

</details>

[Link to this property](<#(resource)%20ai.models.schema%20%3E%20(model)%20schema_get_response%20%3E%20(schema)>)

#### AITo Markdown

##### [Convert uploaded files to Markdown](https://developers.cloudflare.com/api/python/resources/ai/subresources/to_markdown/methods/transform)

ai.to\_markdown.transform(ToMarkdownTransformParams\*\*kwargs) -> SyncSinglePage\[[ToMarkdownTransformResponse](<https://developers.cloudflare.com/api/python/resources/ai#(resource)%20ai.to_markdown%20%3E%20(model)%20to_markdown_transform_response%20%3E%20(schema)>)]

POST/accounts/{account\_id}/ai/tomarkdown

##### [List supported Markdown conversion formats](https://developers.cloudflare.com/api/python/resources/ai/subresources/to_markdown/methods/supported)

ai.to\_markdown.supported(ToMarkdownSupportedParams\*\*kwargs) -> SyncSinglePage\[[ToMarkdownSupportedResponse](<https://developers.cloudflare.com/api/python/resources/ai#(resource)%20ai.to_markdown%20%3E%20(model)%20to_markdown_supported_response%20%3E%20(schema)>)]

GET/accounts/{account\_id}/ai/tomarkdown/supported

##### ModelsExpand Collapse

<details>

<summary>

class ToMarkdownTransformResponse: …

</summary>

data: str

<a href="#(resource)%20ai.to_markdown%20%3E%20(model)%20to_markdown_transform_response%20%3E%20(schema)%20%3E%20(property)%20data">Link to this property</a>

format: str

<a href="#(resource)%20ai.to_markdown%20%3E%20(model)%20to_markdown_transform_response%20%3E%20(schema)%20%3E%20(property)%20format">Link to this property</a>

mime\_type: str

<a href="#(resource)%20ai.to_markdown%20%3E%20(model)%20to_markdown_transform_response%20%3E%20(schema)%20%3E%20(property)%20mimeType">Link to this property</a>

name: str

<a href="#(resource)%20ai.to_markdown%20%3E%20(model)%20to_markdown_transform_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

tokens: str

<a href="#(resource)%20ai.to_markdown%20%3E%20(model)%20to_markdown_transform_response%20%3E%20(schema)%20%3E%20(property)%20tokens">Link to this property</a>

</details>

[Link to this property](<#(resource)%20ai.to_markdown%20%3E%20(model)%20to_markdown_transform_response%20%3E%20(schema)>)

<details>

<summary>

class ToMarkdownSupportedResponse: …

</summary>

extension: str

<a href="#(resource)%20ai.to_markdown%20%3E%20(model)%20to_markdown_supported_response%20%3E%20(schema)%20%3E%20(property)%20extension">Link to this property</a>

mime\_type: str

<a href="#(resource)%20ai.to_markdown%20%3E%20(model)%20to_markdown_supported_response%20%3E%20(schema)%20%3E%20(property)%20mimeType">Link to this property</a>

</details>

[Link to this property](<#(resource)%20ai.to_markdown%20%3E%20(model)%20to_markdown_supported_response%20%3E%20(schema)>)