Skip to content
Start here

AI

Execute AI model
ai.run(strmodel_name, AIRunParams**kwargs) -> AIRunResponse
POST/accounts/{account_id}/ai/run/{model_name}
ModelsExpand Collapse

An array of classification results for the input text

One of the following:
List[TextClassification]

An array of classification results for the input text

label: Optional[str]

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

score: Optional[float]

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

object

The generated image in PNG format

class Audio:
audio: Optional[str]

The generated audio in MP3 format, base64-encoded

object

The generated audio in MP3 format

class TextEmbeddings:
data: Optional[List[List[float]]]

Embeddings of the requested text values

shape: Optional[List[float]]
class AutomaticSpeechRecognition:
text: str

The transcription

vtt: Optional[str]
word_count: Optional[float]
words: Optional[List[AutomaticSpeechRecognitionWord]]
end: Optional[float]

The ending second when the word completes

start: Optional[float]

The second this word begins in the recording

word: Optional[str]
List[ImageClassification]
label: Optional[str]

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

score: Optional[float]

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

List[ObjectDetection]

An array of detected objects within the input image

box: Optional[ObjectDetectionBox]

Coordinates defining the bounding box around the detected object

xmax: Optional[float]

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

xmin: Optional[float]

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

ymax: Optional[float]

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

ymin: Optional[float]

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

label: Optional[str]

The class label or name of the detected object

score: Optional[float]

Confidence score indicating the likelihood that the detection is correct

class UnionMember8:
response: str

The generated text response from the model

tool_calls: Optional[List[UnionMember8ToolCall]]

An array of tool calls requests made during the response generation

arguments: Optional[object]

The arguments passed to be passed to the tool call request

name: Optional[str]

The name of the tool to be called

usage: Optional[UnionMember8Usage]

Usage statistics for the inference request

completion_tokens: Optional[float]

Total number of tokens in output

prompt_tokens: Optional[float]

Total number of tokens in input

total_tokens: Optional[float]

Total number of input and output tokens

object
class Translation:
translated_text: Optional[str]

The translated text in the target language

class Summarization:
summary: Optional[str]

The summarized version of the input text

class ImageToText:
description: Optional[str]
class ImageTextToText:
description: Optional[str]
class MultimodalEmbeddings:
data: Optional[List[List[float]]]
shape: Optional[List[float]]

AIFinetunes

List Finetunes
ai.finetunes.list(FinetuneListParams**kwargs) -> FinetuneListResponse
GET/accounts/{account_id}/ai/finetunes
Create a new Finetune
ai.finetunes.create(FinetuneCreateParams**kwargs) -> FinetuneCreateResponse
POST/accounts/{account_id}/ai/finetunes
ModelsExpand Collapse
class FinetuneListResponse:
id: str
formatuuid
created_at: datetime
formatdate-time
model: str
modified_at: datetime
formatdate-time
name: str
description: Optional[str]
class FinetuneCreateResponse:
id: str
formatuuid
created_at: datetime
formatdate-time
model: str
modified_at: datetime
formatdate-time
name: str
public: bool
description: Optional[str]

AIFinetunesAssets

Upload a Finetune Asset
ai.finetunes.assets.create(strfinetune_id, AssetCreateParams**kwargs) -> AssetCreateResponse
POST/accounts/{account_id}/ai/finetunes/{finetune_id}/finetune-assets
ModelsExpand Collapse
class AssetCreateResponse:
success: bool

AIFinetunesPublic

List Public Finetunes
ai.finetunes.public.list(PublicListParams**kwargs) -> SyncSinglePage[PublicListResponse]
GET/accounts/{account_id}/ai/finetunes/public
ModelsExpand Collapse
class PublicListResponse:
id: str
formatuuid
created_at: datetime
formatdate-time
model: str
modified_at: datetime
formatdate-time
name: str
public: bool
description: Optional[str]

AIAuthors

Author Search
ai.authors.list(AuthorListParams**kwargs) -> SyncSinglePage[object]
GET/accounts/{account_id}/ai/authors/search

AITasks

Task Search
ai.tasks.list(TaskListParams**kwargs) -> SyncSinglePage[object]
GET/accounts/{account_id}/ai/tasks/search

AIModels

Model Search
ai.models.list(ModelListParams**kwargs) -> SyncV4PagePaginationArray[object]
GET/accounts/{account_id}/ai/models/search

AIModelsSchema

Get Model Schema
ai.models.schema.get(SchemaGetParams**kwargs) -> SchemaGetResponse
GET/accounts/{account_id}/ai/models/schema
ModelsExpand Collapse
class SchemaGetResponse:
input: Input
additional_properties: bool
description: str
type: str
output: Output
additional_properties: bool
description: str
type: str

AITo Markdown

Convert Files into Markdown
ai.to_markdown.transform(ToMarkdownTransformParams**kwargs) -> SyncSinglePage[ToMarkdownTransformResponse]
POST/accounts/{account_id}/ai/tomarkdown
Get all converted formats supported
ai.to_markdown.supported(ToMarkdownSupportedParams**kwargs) -> SyncSinglePage[ToMarkdownSupportedResponse]
GET/accounts/{account_id}/ai/tomarkdown/supported
ModelsExpand Collapse
class ToMarkdownTransformResponse:
data: str
format: str
mime_type: str
name: str
tokens: str
class ToMarkdownSupportedResponse:
extension: str
mime_type: str