Skip to main content
AI/ML API logo
  • Category: artificial intelligence
  • Auth: API_KEY
  • Composio-managed OAuth available? N/A
  • Tools: 30
  • Triggers: 0
  • Slug: AI_ML_API
  • Version: 20261101_00

Tools

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

Input Parameters

string
required
The unique identifier of the run to cancel.
string
required
The unique identifier of the thread containing the run to cancel.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_CREATE_ASSISTANTTool 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

string
The name of the assistant. Maximum 256 characters.
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")
required
ID of the model to use for the assistant. Choose from available OpenAI-compatible models.
array
List of tools enabled for the assistant. Can include code_interpreter, file_search, or custom functions.
number
Nucleus sampling parameter. The model considers tokens with cumulative probability up to top_p.
object
Custom key-value pairs for storing additional information. Keys max 64 characters, values max 512 characters.
string
The description of what the assistant does. Maximum 512 characters.
number
Controls randomness in outputs. Higher values (e.g., 1.5) make output more random, lower values (e.g., 0.2) make it more deterministic.
string
System instructions that guide the assistant’s behavior. Maximum 256,000 characters.
object
Resources for assistant tools.
string
Output format specification. Can be ‘auto’, ‘text’, ‘json_object’, or a ResponseFormat object with json_schema.
string ("low" | "medium" | "high")
Reasoning effort levels for assistant responses.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_CREATE_MESSAGETool 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

string ("user" | "assistant")
required
The role of the entity creating the message. Must be ‘user’ or ‘assistant’.
string
required
The text content of the message. Can be a string or an array of content parts.
object
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.
string
required
The ID of the thread to create the message in
array
A list of files attached to the message and the tools they should be added to

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_CREATE_RUNTool 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

string
The ID of the model to be used to execute this run. If not provided, uses the assistant’s default model.
array
Override the tools the assistant can use for this run. This is useful for enabling or disabling specific functions.
number
Nucleus sampling parameter. An alternative to temperature for controlling randomness.
object
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.
string
required
The ID of the thread to run the assistant on.
number
The sampling temperature to use, between 0 and 2. Higher values make output more random, lower values more deterministic.
string
Controls which (if any) tool is called by the model. Can be ‘none’, ‘auto’, or a specific tool.
string
required
The ID of the assistant to use to execute this run.
string
Overrides the instructions of the assistant. This is useful for customizing behavior on a per-run basis.
string
Specifies the format that the model must output. Can be used for JSON mode.
integer
The maximum number of prompt tokens that may be used over the course of the run.
array
Adds additional messages to the thread before creating the run.
boolean
Whether to enable parallel function calling during tool use.
object
Controls how the thread’s context window is truncated if it exceeds the model’s limit.
integer
The maximum number of completion tokens that may be used over the course of the run.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_CREATE_THREADTool 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

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

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_DELETE_ASSISTANTTool to delete an assistant by ID. Use when you need to remove an assistant that is no longer needed.

Input Parameters

string
required
The ID of the assistant to delete.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_DELETE_MESSAGETool 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

string
required
The identifier of the thread from which to delete the message.
string
required
The identifier of the message to delete from the thread.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_DELETE_THREADTool to delete a thread by its ID. Use when you need to remove an existing thread from the system.

Input Parameters

string
required
The unique identifier of the thread to delete.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_GET_ASSISTANTTool 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

string
required
The unique identifier of the assistant to retrieve.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_GET_BILLING_BALANCETool to retrieve the current billing balance for the account. Use when you need to check available credits, balance status, or auto-debit configuration.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_GET_LUMA_GENERATIONTool 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

string
required
Comma-separated list of generation IDs to fetch. Use the ID(s) returned from the generation creation request.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_GET_MESSAGETool 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

string
required
The ID of the thread that the message belongs to
string
required
The ID of the message to retrieve

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_GET_RESPONSETool 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

array
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).
string
required
The unique identifier of the response to retrieve.
integer
For pagination, specify the starting point after this index.
boolean
Whether to include obfuscation in the response.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_GET_RUNTool 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

string
required
The ID of the run to retrieve.
string
required
The ID of the thread that the run belongs to.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_GET_RUN_STEPTool 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

string
required
The ID of the run to which the step belongs.
string
required
The ID of the run step to retrieve.
string
required
The ID of the thread to which the run and step belong.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_GET_THREADTool 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

string
required
The unique identifier of the thread to retrieve.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_LIST_ASSISTANTSTool to list all assistants associated with the account. Use when you need to retrieve available assistants with pagination support.

Input Parameters

string
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.
integer
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
string ("asc" | "desc")
Sort order by the created_at timestamp of the objects. ‘asc’ for ascending order and ‘desc’ for descending order.
string
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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_LIST_BATCHESRetrieve the status and request counts of a batch processing job by ID. The response may include a URL for retrieving completed results.

Input Parameters

string
required
The ID of the batch to get status or results for. Must start with ‘msgbatch_’ prefix.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_LIST_LUMA_GENERATIONSList the authenticated user’s Luma AI video generation tasks with optional limit and offset pagination. The limit can be between 1 and 100.

Input Parameters

integer
Maximum number of generations to return. Defaults to API default (100) if not specified.
integer
Number of generations to skip before starting to return results. Defaults to 0 if not specified.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_LIST_MESSAGESTool 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

string
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.
integer
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
string ("asc" | "desc")
Sort order for messages.
string
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.
string
Filter Messages by the Run ID that generated them.
string
required
The ID of the thread to retrieve messages from.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_LIST_MODELSTool 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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_LIST_MODELS_WITH_DETAILSTool 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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_LIST_RUNSTool to list all runs for a specific thread. Use when you need to retrieve runs with pagination support.

Input Parameters

string
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.
integer
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
string ("asc" | "desc")
Sort order by the created_at timestamp of the objects. ‘asc’ for ascending order and ‘desc’ for descending order.
string
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.
string
required
The ID of the thread to retrieve runs from.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_LIST_RUN_STEPSTool 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

string
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.
integer
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
string ("asc" | "desc")
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
string
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.
string
required
The ID of the run that contains the steps.
string
required
The ID of the thread that contains the run.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_SUBMIT_TOOL_OUTPUTSTool 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

string
required
The ID of the run that requires tool outputs.
boolean
If true, returns a stream of events that happen during the Run as server-sent events. Defaults to false.
string
required
The ID of the thread to which the run belongs.
array
required
A list of tools for which the outputs are being submitted.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_TEXT_CHAT_COMPLETIONTool 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

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

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_UPDATE_ASSISTANTTool 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

string
The name of the assistant. Maximum 256 characters.
string
The AI model to use for the assistant.
array
Array of enabled tools for the assistant. Each tool should be an object with a ‘type’ field (code_interpreter, file_search, or function).
number
Nucleus sampling parameter as an alternative to temperature. The model considers tokens with cumulative probability up to top_p. Range: 0-1.
object
Custom key-value pairs for storing additional information. Maximum 16 pairs.
string
A brief description of what the assistant does. Maximum 512 characters.
number
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.
string
required
The ID of the assistant to update.
string
System instructions that guide the assistant’s behavior and responses. Maximum 256,000 characters.
object
Resources for tools like file IDs for code_interpreter or vector store IDs for file_search.
object
Specifies the output format for responses. Can be auto, text, json_object, or json_schema.
string ("low" | "medium" | "high")
The level of reasoning effort to use for reasoning models. Options: low, medium, high.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_UPDATE_MESSAGETool 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

object
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.
string
required
The ID of the thread that the message belongs to.
string
required
The ID of the message to update.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_UPDATE_RUNTool 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

string
required
The ID of the run to update.
object
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.
string
required
The ID of the thread that the run belongs to.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: AI_ML_API_UPDATE_THREADTool 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

object
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.
string
required
The identifier of the thread to update.
object
A set of resources that are made available to the assistant’s tools in this thread.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not