Skip to content
Start here

AI

Execute AI model
client.ai.run(stringmodelName, AIRunParamsparams, RequestOptionsoptions?): AIRunResponse
POST/accounts/{account_id}/ai/run/{model_name}
ModelsExpand Collapse
AIRunResponse = Array<TextClassification> | Uploadable | Audio { audio } | 12 more

An array of classification results for the input text

One of the following:
Array<TextClassification>
label?: string

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

score?: number

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

Uploadable
Audio { audio }
audio?: string

The generated audio in MP3 format, base64-encoded

Uploadable
TextEmbeddings { data, shape }
data?: Array<Array<number>>

Embeddings of the requested text values

shape?: Array<number>
AutomaticSpeechRecognition { text, vtt, word_count, words }
text: string

The transcription

vtt?: string
word_count?: number
words?: Array<Word>
end?: number

The ending second when the word completes

start?: number

The second this word begins in the recording

word?: string
Array<ImageClassification>
label?: string

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

score?: number

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

Array<ObjectDetection>
box?: Box { xmax, xmin, ymax, ymin }

Coordinates defining the bounding box around the detected object

xmax?: number

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

xmin?: number

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

ymax?: number

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

ymin?: number

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

label?: string

The class label or name of the detected object

score?: number

Confidence score indicating the likelihood that the detection is correct

UnionMember8 { response, tool_calls, usage }
response: string

The generated text response from the model

tool_calls?: Array<ToolCall>

An array of tool calls requests made during the response generation

arguments?: unknown

The arguments passed to be passed to the tool call request

name?: string

The name of the tool to be called

usage?: Usage { completion_tokens, prompt_tokens, total_tokens }

Usage statistics for the inference request

completion_tokens?: number

Total number of tokens in output

prompt_tokens?: number

Total number of tokens in input

total_tokens?: number

Total number of input and output tokens

Uploadable
Translation { translated_text }
translated_text?: string

The translated text in the target language

Summarization { summary }
summary?: string

The summarized version of the input text

ImageToText { description }
description?: string
ImageTextToText { description }
description?: string
MultimodalEmbeddings { data, shape }
data?: Array<Array<number>>
shape?: Array<number>

AIFinetunes

List Finetunes
client.ai.finetunes.list(FinetuneListParams { account_id } params, RequestOptionsoptions?): FinetuneListResponse { id, created_at, model, 3 more }
GET/accounts/{account_id}/ai/finetunes
Create a new Finetune
client.ai.finetunes.create(FinetuneCreateParams { account_id, model, name, 2 more } params, RequestOptionsoptions?): FinetuneCreateResponse { id, created_at, model, 4 more }
POST/accounts/{account_id}/ai/finetunes
ModelsExpand Collapse
FinetuneListResponse { id, created_at, model, 3 more }
id: string
formatuuid
created_at: string
formatdate-time
model: string
modified_at: string
formatdate-time
name: string
description?: string
FinetuneCreateResponse { id, created_at, model, 4 more }
id: string
formatuuid
created_at: string
formatdate-time
model: string
modified_at: string
formatdate-time
name: string
public: boolean
description?: string

AIFinetunesAssets

Upload a Finetune Asset
client.ai.finetunes.assets.create(stringfinetuneId, AssetCreateParams { account_id, file, file_name } params, RequestOptionsoptions?): AssetCreateResponse { success }
POST/accounts/{account_id}/ai/finetunes/{finetune_id}/finetune-assets
ModelsExpand Collapse
AssetCreateResponse { success }
success: boolean

AIFinetunesPublic

List Public Finetunes
client.ai.finetunes.public.list(PublicListParams { account_id, limit, offset, orderBy } params, RequestOptionsoptions?): SinglePage<PublicListResponse { id, created_at, model, 4 more } >
GET/accounts/{account_id}/ai/finetunes/public
ModelsExpand Collapse
PublicListResponse { id, created_at, model, 4 more }
id: string
formatuuid
created_at: string
formatdate-time
model: string
modified_at: string
formatdate-time
name: string
public: boolean
description?: string

AIAuthors

Author Search
client.ai.authors.list(AuthorListParams { account_id } params, RequestOptionsoptions?): SinglePage<AuthorListResponse>
GET/accounts/{account_id}/ai/authors/search
ModelsExpand Collapse
AuthorListResponse = unknown

AITasks

Task Search
client.ai.tasks.list(TaskListParams { account_id } params, RequestOptionsoptions?): SinglePage<TaskListResponse>
GET/accounts/{account_id}/ai/tasks/search
ModelsExpand Collapse
TaskListResponse = unknown

AIModels

Model Search
client.ai.models.list(ModelListParams { account_id, author, hide_experimental, 5 more } params, RequestOptionsoptions?): V4PagePaginationArray<ModelListResponse>
GET/accounts/{account_id}/ai/models/search
ModelsExpand Collapse
ModelListResponse = unknown

AIModelsSchema

Get Model Schema
client.ai.models.schema.get(SchemaGetParams { account_id, model } params, RequestOptionsoptions?): SchemaGetResponse { input, output }
GET/accounts/{account_id}/ai/models/schema
ModelsExpand Collapse
SchemaGetResponse { input, output }
input: Input { additionalProperties, description, type }
additionalProperties: boolean
description: string
type: string
output: Output { additionalProperties, description, type }
additionalProperties: boolean
description: string
type: string

AITo Markdown

Convert Files into Markdown
client.ai.toMarkdown.transform(ToMarkdownTransformParams { account_id, file } params, RequestOptionsoptions?): SinglePage<ToMarkdownTransformResponse { data, format, mimeType, 2 more } >
POST/accounts/{account_id}/ai/tomarkdown
Get all converted formats supported
client.ai.toMarkdown.supported(ToMarkdownSupportedParams { account_id } params, RequestOptionsoptions?): SinglePage<ToMarkdownSupportedResponse { extension, mimeType } >
GET/accounts/{account_id}/ai/tomarkdown/supported
ModelsExpand Collapse
ToMarkdownTransformResponse { data, format, mimeType, 2 more }
data: string
format: string
mimeType: string
name: string
tokens: string
ToMarkdownSupportedResponse { extension, mimeType }
extension: string
mimeType: string