# AI/ML API

AI/ML API provides a suite of AI models and solutions for various tasks, including text generation, image processing, and more.

- **Category:** artificial intelligence
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 30
- **Triggers:** 0
- **Slug:** `AI_ML_API`
- **Version:** 20260312_00

## Tools

### Cancel Run

**Slug:** `AI_ML_API_CANCEL_RUN`

Tool to cancel a run that is currently in progress. Use when you need to stop an assistant run before it completes.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `run_id` | string | Yes | The unique identifier of the run to cancel. |
| `thread_id` | string | Yes | The unique identifier of the thread containing the run to cancel. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Assistant

**Slug:** `AI_ML_API_CREATE_ASSISTANT`

Tool to create an AI assistant with configurable model, instructions, and tools. Use when you need to set up a new assistant that can maintain conversation context and use tools like code_interpreter or file_search.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The name of the assistant. Maximum 256 characters. |
| `model` | string ("openai/gpt-4o" | "gpt-4o-2024-08-06" | "gpt-4o-2024-05-13" | "gpt-4o-mini" | "gpt-4o-mini-2024-07-18" | "gpt-4-turbo" | "gpt-4-turbo-2024-04-09" | "gpt-4" | "gpt-4-0125-preview" | "gpt-4-1106-preview" | "gpt-3.5-turbo" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-1106" | "o3-mini" | "openai/gpt-4.1-2025-04-14" | "openai/gpt-4.1-mini-2025-04-14" | "openai/gpt-4.1-nano-2025-04-14" | "o1") | Yes | ID of the model to use for the assistant. Choose from available OpenAI-compatible models. |
| `tools` | array | No | List of tools enabled for the assistant. Can include code_interpreter, file_search, or custom functions. |
| `top_p` | number | No | Nucleus sampling parameter. The model considers tokens with cumulative probability up to top_p. |
| `metadata` | object | No | Custom key-value pairs for storing additional information. Keys max 64 characters, values max 512 characters. |
| `description` | string | No | The description of what the assistant does. Maximum 512 characters. |
| `temperature` | number | No | Controls randomness in outputs. Higher values (e.g., 1.5) make output more random, lower values (e.g., 0.2) make it more deterministic. |
| `instructions` | string | No | System instructions that guide the assistant's behavior. Maximum 256,000 characters. |
| `tool_resources` | object | No | Resources for assistant tools. |
| `response_format` | string | No | Output format specification. Can be 'auto', 'text', 'json_object', or a ResponseFormat object with json_schema. |
| `reasoning_effort` | string ("low" | "medium" | "high") | No | Reasoning effort levels for assistant responses. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Message

**Slug:** `AI_ML_API_CREATE_MESSAGE`

Tool to create a new message in a thread. Use when you need to add a user or assistant message to an existing conversation thread.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `role` | string ("user" | "assistant") | Yes | The role of the entity creating the message. Must be 'user' or 'assistant'. |
| `content` | string | Yes | The text content of the message. Can be a string or an array of content parts. |
| `metadata` | object | No | Set of up to 16 key-value pairs for storing additional information. Keys can be a maximum of 64 characters and values can be a maximum of 512 characters. |
| `thread_id` | string | Yes | The ID of the thread to create the message in |
| `attachments` | array | No | A list of files attached to the message and the tools they should be added to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Run

**Slug:** `AI_ML_API_CREATE_RUN`

Tool to create a run that executes an assistant on a thread. The assistant processes messages in the thread and generates responses based on its instructions and available tools.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | No | The ID of the model to be used to execute this run. If not provided, uses the assistant's default model. |
| `tools` | array | No | Override the tools the assistant can use for this run. This is useful for enabling or disabling specific functions. |
| `top_p` | number | No | Nucleus sampling parameter. An alternative to temperature for controlling randomness. |
| `metadata` | object | No | Set of 16 key-value pairs that can be attached to the run. Keys can be a maximum of 64 characters, and values can be a maximum of 512 characters. |
| `thread_id` | string | Yes | The ID of the thread to run the assistant on. |
| `temperature` | number | No | The sampling temperature to use, between 0 and 2. Higher values make output more random, lower values more deterministic. |
| `tool_choice` | string | No | Controls which (if any) tool is called by the model. Can be 'none', 'auto', or a specific tool. |
| `assistant_id` | string | Yes | The ID of the assistant to use to execute this run. |
| `instructions` | string | No | Overrides the instructions of the assistant. This is useful for customizing behavior on a per-run basis. |
| `response_format` | string | No | Specifies the format that the model must output. Can be used for JSON mode. |
| `max_prompt_tokens` | integer | No | The maximum number of prompt tokens that may be used over the course of the run. |
| `additional_messages` | array | No | Adds additional messages to the thread before creating the run. |
| `parallel_tool_calls` | boolean | No | Whether to enable parallel function calling during tool use. |
| `truncation_strategy` | object | No | Controls how the thread's context window is truncated if it exceeds the model's limit. |
| `max_completion_tokens` | integer | No | The maximum number of completion tokens that may be used over the course of the run. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Thread

**Slug:** `AI_ML_API_CREATE_THREAD`

Tool to create a new thread for conversation with an assistant. Threads store messages and maintain context across interactions. Use when starting a new conversation or when you need a fresh context for assistant interactions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `messages` | array | No | Initial messages to populate the thread with. Each message must have a role and content. |
| `metadata` | object | No | Custom key-value pairs for storing additional information (max 16 pairs, keys ≤64 chars, values ≤512 chars). |
| `tool_resources` | object | No | Resources available to assistant tools. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Assistant

**Slug:** `AI_ML_API_DELETE_ASSISTANT`

Tool to delete an assistant by ID. Use when you need to remove an assistant that is no longer needed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `assistant_id` | string | Yes | The ID of the assistant to delete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Message

**Slug:** `AI_ML_API_DELETE_MESSAGE`

Tool to delete a specific message from a thread. Use when you need to remove an unwanted or erroneous message from a conversation thread.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `thread_id` | string | Yes | The identifier of the thread from which to delete the message. |
| `message_id` | string | Yes | The identifier of the message to delete from the thread. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Thread

**Slug:** `AI_ML_API_DELETE_THREAD`

Tool to delete a thread by its ID. Use when you need to remove an existing thread from the system.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `thread_id` | string | Yes | The unique identifier of the thread to delete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Assistant

**Slug:** `AI_ML_API_GET_ASSISTANT`

Tool to retrieve details of a specific assistant by ID. Use when you need to fetch configuration, model settings, instructions, or available tools for an existing assistant.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `assistant_id` | string | Yes | The unique identifier of the assistant to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Billing Balance

**Slug:** `AI_ML_API_GET_BILLING_BALANCE`

Tool to retrieve the current billing balance for the account. Use when you need to check available credits, balance status, or auto-debit configuration.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Luma Generation

**Slug:** `AI_ML_API_GET_LUMA_GENERATION`

Tool to fetch Luma AI video generation results by generation IDs. Use after creating a generation to check its status and retrieve the generated video URL when completed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ids` | string | Yes | Comma-separated list of generation IDs to fetch. Use the ID(s) returned from the generation creation request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Message

**Slug:** `AI_ML_API_GET_MESSAGE`

Tool to retrieve information about a specific message by its ID. Use when you need to fetch details of a particular message in a thread.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `thread_id` | string | Yes | The ID of the thread that the message belongs to |
| `message_id` | string | Yes | The ID of the message to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Response by ID

**Slug:** `AI_ML_API_GET_RESPONSE`

Tool to retrieve a previously generated model response by its unique ID. Use when you need to access details of a specific response, including its output, status, and usage statistics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `include` | array | No | Specify additional output data to include in the model response. Supported values: code_interpreter_call.outputs (python code execution outputs), computer_call_output.output.image_url (image URLs from computer call), file_search_call.results (file search tool call results), message.output_text.logprobs (logprobs with assistant messages), reasoning.encrypted_content (encrypted reasoning tokens for multi-turn conversations). |
| `response_id` | string | Yes | The unique identifier of the response to retrieve. |
| `starting_after` | integer | No | For pagination, specify the starting point after this index. |
| `include_obfuscation` | boolean | No | Whether to include obfuscation in the response. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Run

**Slug:** `AI_ML_API_GET_RUN`

Tool to retrieve a specific run by ID from a thread. Use when you need to check the status, results, or details of a previously created run.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `run_id` | string | Yes | The ID of the run to retrieve. |
| `thread_id` | string | Yes | The ID of the thread that the run belongs to. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Run Step

**Slug:** `AI_ML_API_GET_RUN_STEP`

Tool to retrieve a specific run step by its ID within a thread and run. Use when you need detailed information about a particular step's execution status and results.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `run_id` | string | Yes | The ID of the run to which the step belongs. |
| `step_id` | string | Yes | The ID of the run step to retrieve. |
| `thread_id` | string | Yes | The ID of the thread to which the run and step belong. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Thread

**Slug:** `AI_ML_API_GET_THREAD`

Tool to retrieve information about a specific thread by ID. Use when you need to fetch thread details, metadata, or available tool resources for an existing conversation thread.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `thread_id` | string | Yes | The unique identifier of the thread to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Assistants

**Slug:** `AI_ML_API_LIST_ASSISTANTS`

Tool to list all assistants associated with the account. Use when you need to retrieve available assistants with pagination support.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `after` | string | No | A cursor for use in pagination. 'after' is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
| `limit` | integer | No | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
| `order` | string ("asc" | "desc") | No | Sort order by the created_at timestamp of the objects. 'asc' for ascending order and 'desc' for descending order. |
| `before` | string | No | A cursor for use in pagination. 'before' is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Batches

**Slug:** `AI_ML_API_LIST_BATCHES`

Tool to get the status or results of a batch processing job. Use when you need to check the progress or retrieve results of a previously submitted batch.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `batch_id` | string | Yes | The ID of the batch to get status or results for. Must start with 'msgbatch_' prefix. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Luma AI Generations

**Slug:** `AI_ML_API_LIST_LUMA_GENERATIONS`

Tool to fetch user's Luma AI video generations. Use when you need to retrieve a list of all Luma AI video generation tasks for the authenticated user.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Thread Messages

**Slug:** `AI_ML_API_LIST_MESSAGES`

Tool to retrieve a list of messages from a specific thread. Use when you need to fetch conversation history or message content from an AI assistant thread.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `after` | string | No | A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
| `limit` | integer | No | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
| `order` | string ("asc" | "desc") | No | Sort order for messages. |
| `before` | string | No | A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
| `run_id` | string | No | Filter Messages by the Run ID that generated them. |
| `thread_id` | string | Yes | The ID of the thread to retrieve messages from. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Models

**Slug:** `AI_ML_API_LIST_MODELS`

Tool to list all available AI models from the AI/ML API. Use when you need to retrieve the complete catalog of 400+ models including chat, image, video, voice, and other model types.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Models With Details

**Slug:** `AI_ML_API_LIST_MODELS_WITH_DETAILS`

Tool to list all available AI/ML models with detailed information including pricing, features, and capabilities. Use when you need to discover available models or get comprehensive model metadata.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Runs

**Slug:** `AI_ML_API_LIST_RUNS`

Tool to list all runs for a specific thread. Use when you need to retrieve runs with pagination support.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `after` | string | No | A cursor for use in pagination. 'after' is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
| `limit` | integer | No | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
| `order` | string ("asc" | "desc") | No | Sort order by the created_at timestamp of the objects. 'asc' for ascending order and 'desc' for descending order. |
| `before` | string | No | A cursor for use in pagination. 'before' is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
| `thread_id` | string | Yes | The ID of the thread to retrieve runs from. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Run Steps

**Slug:** `AI_ML_API_LIST_RUN_STEPS`

Tool to list the steps in a run. Use when you need to retrieve and examine the execution steps of a specific run within a thread.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `after` | string | No | A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
| `limit` | integer | No | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
| `order` | string ("asc" | "desc") | No | Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. |
| `before` | string | No | A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
| `run_id` | string | Yes | The ID of the run that contains the steps. |
| `thread_id` | string | Yes | The ID of the thread that contains the run. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Submit Tool Outputs

**Slug:** `AI_ML_API_SUBMIT_TOOL_OUTPUTS`

Tool to submit tool outputs for a run that requires action. Use when a run has status 'requires_action' and needs tool call results to continue execution.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `run_id` | string | Yes | The ID of the run that requires tool outputs. |
| `stream` | boolean | No | If true, returns a stream of events that happen during the Run as server-sent events. Defaults to false. |
| `thread_id` | string | Yes | The ID of the thread to which the run belongs. |
| `tool_outputs` | array | Yes | A list of tools for which the outputs are being submitted. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Text Chat Completion

**Slug:** `AI_ML_API_TEXT_CHAT_COMPLETION`

Tool to generate text completions or chat responses using a specified LLM model. Use after assembling the conversation history to produce the next response.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `n` | integer | No | Number of completions to generate for each prompt. |
| `stop` | array | No | Up to four sequences where the API will stop generating further tokens. |
| `user` | string | No | Unique identifier representing the end-user. |
| `model` | string | Yes | The identifier of the model to use for generating responses. |
| `top_p` | number | No | Nucleus sampling threshold; model considers tokens with cumulative probability up to top_p. |
| `stream` | boolean | No | Whether to stream the response as tokens are generated. |
| `messages` | array | Yes | List of message objects for conversation history. |
| `logit_bias` | object | No | Adjust the likelihood of specified tokens appearing in the completion. |
| `max_tokens` | integer | No | Maximum number of tokens to generate in the response. |
| `temperature` | number | No | Sampling temperature between 0 and 2; higher values make output more random, lower values more deterministic. |
| `presence_penalty` | number | No | Penalty for new tokens based on whether they appear in the text so far. |
| `frequency_penalty` | number | No | Penalty for new tokens based on their existing frequency in the text. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Assistant

**Slug:** `AI_ML_API_UPDATE_ASSISTANT`

Tool to modify an existing assistant's properties including name, instructions, model, and tools. Use when you need to update an assistant's configuration or behavior after it has been created.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The name of the assistant. Maximum 256 characters. |
| `model` | string | No | The AI model to use for the assistant. |
| `tools` | array | No | Array of enabled tools for the assistant. Each tool should be an object with a 'type' field (code_interpreter, file_search, or function). |
| `top_p` | number | No | Nucleus sampling parameter as an alternative to temperature. The model considers tokens with cumulative probability up to top_p. Range: 0-1. |
| `metadata` | object | No | Custom key-value pairs for storing additional information. Maximum 16 pairs. |
| `description` | string | No | A brief description of what the assistant does. Maximum 512 characters. |
| `temperature` | number | No | Sampling parameter that controls output randomness. Higher values (e.g., 1.5) make output more random, lower values (e.g., 0.5) make it more deterministic. Range: 0-2. |
| `assistant_id` | string | Yes | The ID of the assistant to update. |
| `instructions` | string | No | System instructions that guide the assistant's behavior and responses. Maximum 256,000 characters. |
| `tool_resources` | object | No | Resources for tools like file IDs for code_interpreter or vector store IDs for file_search. |
| `response_format` | object | No | Specifies the output format for responses. Can be auto, text, json_object, or json_schema. |
| `reasoning_effort` | string ("low" | "medium" | "high") | No | The level of reasoning effort to use for reasoning models. Options: low, medium, high. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Message

**Slug:** `AI_ML_API_UPDATE_MESSAGE`

Tool to modify metadata for a specific message in a thread. Use when you need to update message metadata such as tags or custom fields.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `metadata` | object | No | Set of up to 16 key-value pairs that can be attached to the message. Keys must be strings up to 64 characters long, and values must be strings up to 512 characters long. This is the only field that can be modified when updating a message. |
| `thread_id` | string | Yes | The ID of the thread that the message belongs to. |
| `message_id` | string | Yes | The ID of the message to update. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Run

**Slug:** `AI_ML_API_UPDATE_RUN`

Tool to update a run's metadata with key-value pairs. Use when you need to attach or modify additional information for a specific run.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `run_id` | string | Yes | The ID of the run to update. |
| `metadata` | object | No | Key-value pairs for storing additional information about the run. Maximum 16 pairs allowed. Keys can be a maximum of 64 characters, and values can be a maximum of 512 characters. |
| `thread_id` | string | Yes | The ID of the thread that the run belongs to. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Thread

**Slug:** `AI_ML_API_UPDATE_THREAD`

Tool to update thread metadata and tool resources in the AI/ML API. Use when you need to modify existing thread properties or attach resources.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `metadata` | object | No | Set of up to 16 key-value pairs that can be attached to the thread. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
| `thread_id` | string | Yes | The identifier of the thread to update. |
| `tool_resources` | object | No | A set of resources that are made available to the assistant's tools in this thread. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
