> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM API

> LLM API provides a unified inference API for text, embeddings, images, audio, video, files, and batch workloads across multiple AI providers.

![LLM API logo](https://mintcdn.com/composio-preview/ufpARLIsio16odJB/images/toolkits/llm_api.svg?fit=max\&auto=format\&n=ufpARLIsio16odJB\&q=85\&s=a0a31dfe1e6706a519caa6bcd4d15c75)

* **Category:** artificial intelligence
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 12
* **Triggers:** 0
* **Slug:** `LLM_API`
* **Version:** 20261101\_00

## Tools

> [accordion] Cancel Batch
>
> **Slug:** `LLM_API_CANCEL_BATCH`
>
> Request best-effort cancellation of an in-progress batch. Return the provider's actual batch state without implying cancellation took effect; work may still finish and incur charges before the request is applied.
>
> #### Input Parameters
>
> **batch\_id** `string` *required*
>
> ID of the batch whose cancellation should be requested.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Count Anthropic Message Tokens
>
> **Slug:** `LLM_API_COUNT_ANTHROPIC_MESSAGE_TOKENS`
>
> Count input tokens for an Anthropic-compatible message request without generating a model response.
>
> #### Input Parameters
>
> **model** `string` *required*
>
> Model ID or alias whose tokenizer and message framing should be used.
>
> **tools** `array`
>
> Anthropic-compatible tool definitions whose framing should be included in the count.
>
> **system** `string`
>
> System prompt as text or Anthropic-compatible content blocks to include in the count.
>
> **messages** `array` *required*
>
> Ordered, non-empty Anthropic-compatible messages to include in the token count.
>
> **tool\_choice** `object`
>
> Anthropic-compatible tool-selection configuration to include in the message framing.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Anthropic Message
>
> **Slug:** `LLM_API_CREATE_ANTHROPIC_MESSAGE`
>
> Generate one complete, non-streaming Anthropic-compatible message with flexible content blocks, system prompts, and tool use with your own connection. Instant supports the Claude models listed in its pricing, with plain-text messages and a plain-text system prompt; tools, content blocks and other models are rejected before provider execution.
>
> #### Input Parameters
>
> **model** `string` *required*
>
> Claude-family or other model ID exposed through the Anthropic-compatible Messages contract.
>
> **tools** `array`
>
> Anthropic-compatible tool definitions available to the model.
>
> **top\_p** `number`
>
> Nucleus-sampling probability from 0 through 1, when supported.
>
> **system** `string`
>
> Anthropic-compatible system prompt as text or supported content blocks.
>
> **messages** `array` *required*
>
> Ordered, non-empty Anthropic-compatible conversation messages.
>
> **max\_tokens** `integer` *required*
>
> Maximum number of output tokens to generate.
>
> **temperature** `number`
>
> Sampling temperature from 0 through 1, when supported by the model.
>
> **tool\_choice** `object`
>
> Anthropic-compatible tool-selection configuration.
>
> **stop\_sequences** `array`
>
> Custom text sequences that stop generation.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Chat Completion
>
> **Slug:** `LLM_API_CREATE_CHAT_COMPLETION`
>
> Generate a complete, non-streaming OpenAI-compatible chat response. Instant supports only the models listed in its pricing, with plain-text messages: no tools, multimodal content, web search, or reasoning-effort overrides. Unsupported Instant requests are rejected before provider execution. With your own connection, use models and capabilities supported by your provider project.
>
> #### Input Parameters
>
> **model** `string` *required*
>
> Model ID or alias from Discover Models that supports chat completions. Instant supports only the models listed in this action's pricing; other models require your own connection.
>
> **tools** `array`
>
> OpenAI-compatible function or provider tool definitions available to the model.
>
> **top\_p** `number`
>
> Nucleus-sampling probability accepted by the selected model; supported ranges are model-dependent.
>
> **messages** `array` *required*
>
> Ordered OpenAI-compatible conversation messages with model-supported content and tool-call fields.
>
> **max\_tokens** `integer`
>
> Maximum tokens to generate for models using the legacy max\_tokens field.
>
> **web\_search** `boolean`
>
> Enable provider web search when the selected model and project support it with your own connection. Instant requires false or omission; true is rejected before provider execution.
>
> **temperature** `number`
>
> Sampling temperature accepted by the selected model; supported ranges are model-dependent.
>
> **tool\_choice** `string`
>
> How the model may select supplied tools, using the OpenAI-compatible form supported by the model.
>
> **no\_reasoning** `boolean`
>
> Disable reasoning when supported, including non-reasoning selection for auto routing.
>
> **response\_format** `object`
>
> OpenAI-compatible response-format object for text, JSON, or a model-supported JSON schema.
>
> **reasoning\_effort** `string`
>
> Reasoning effort for models that advertise this parameter with your own connection. Instant requires omission.
>
> **web\_search\_options** `object`
>
> Provider web-search options for your own connection. Instant requires omission; even an empty object enables search at the provider and is rejected.
>
> **max\_completion\_tokens** `integer`
>
> Maximum completion tokens for models using the newer field. Avoid setting both token limits unless the model supports them.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Embeddings
>
> **Slug:** `LLM_API_CREATE_EMBEDDINGS`
>
> Create vector embeddings for one text or a batch of texts with a selected embedding model. Requires your own connection; this action is unavailable through Instant.
>
> #### Input Parameters
>
> **user** `string`
>
> Stable, non-sensitive end-user identifier for provider abuse monitoring.
>
> **input** `string` *required*
>
> One text or a non-empty list of texts to embed in one request.
>
> **model** `string` *required*
>
> Embedding model ID or alias from the model catalog.
>
> **dimensions** `integer`
>
> Requested vector length when the selected model supports configurable dimensions.
>
> **encoding\_format** `string ("float" | "base64")`
>
> Return each embedding as numeric floats or a base64-encoded string.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Response
>
> **Slug:** `LLM_API_CREATE_RESPONSE`
>
> Generate one complete, non-streaming OpenAI Responses-compatible result from text or structured input, preserving reasoning and tool items. Requires your own connection; this action is unavailable through Instant.
>
> #### Input Parameters
>
> **text** `object`
>
> Responses text-output configuration supported by the selected model.
>
> **input** `string` *required*
>
> Text or OpenAI Responses-compatible input messages/items, including model-supported multimodal content.
>
> **model** `string` *required*
>
> Model ID or alias that supports the Responses API binding.
>
> **tools** `array`
>
> Responses-compatible tools available to the model.
>
> **reasoning** `object`
>
> Reasoning configuration, such as an effort level, for supported models.
>
> **tool\_choice** `string`
>
> Responses-compatible tool-selection policy.
>
> **instructions** `string`
>
> High-level instructions applied to the response.
>
> **response\_format** `object`
>
> Compatibility response-format object supported by the selected model.
>
> **max\_output\_tokens** `integer`
>
> Maximum output tokens. The provider requires at least 16 when supplied.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete File
>
> **Slug:** `LLM_API_DELETE_FILE`
>
> Permanently delete a caller-owned or explicitly authorized project file. This destructive operation cannot be undone; a missing file fails with not found rather than reporting a successful deletion.
>
> #### Input Parameters
>
> **file\_id** `string` *required*
>
> ID of a caller-owned or explicitly authorized project file to delete permanently. This destructive operation cannot be undone.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Discover Models
>
> **Slug:** `LLM_API_DISCOVER_MODELS`
>
> Return one model's full live capabilities by ID, or browse a compact, bounded view of the live model catalog using local capability filters.
>
> #### Input Parameters
>
> **kind** `string`
>
> Optional exact catalog kind to retain, such as chat or embedding.
>
> **model** `string`
>
> Exact model ID or alias to inspect; omit to browse the catalog.
>
> **free\_only** `boolean`
>
> When browsing, return only models cataloged as free. This does not guarantee that the connected account can invoke them.
>
> **max\_results** `integer`
>
> Maximum matching catalog entries to return after local filtering (1-200).
>
> **exclude\_deprecated** `boolean`
>
> Exclude deprecated models from catalog browsing.
>
> **include\_deactivated** `boolean`
>
> Include deactivated models in catalog browsing.
>
> **required\_capability** `string`
>
> Optional capability or supported parameter that returned models must advertise, such as tools or image\_input.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Account and Credits
>
> **Slug:** `LLM_API_GET_ACCOUNT_AND_CREDITS`
>
> Return the connected user, project, organization, purchased and bonus credit balances, funding mode, and balance gating in one account-status read.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List or Get Batches
>
> **Slug:** `LLM_API_LIST_OR_GET_BATCHES`
>
> Return one asynchronous batch and its latest lifecycle, token, and cost status by ID, or one provider-default page of project batches when no batch ID is supplied. List mode supports provider cursor pagination.
>
> #### Input Parameters
>
> **after** `string`
>
> In list mode, return the page after this batch ID. Pass the prior response's last\_id to continue.
>
> **limit** `integer`
>
> In list mode, maximum number of batches for the provider to return.
>
> **batch\_id** `string`
>
> Exact batch ID whose current status should be returned; omit to return one provider-default page of batches.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List or Get Files
>
> **Slug:** `LLM_API_LIST_OR_GET_FILES`
>
> Return metadata for one project file by ID, or one provider-default page of project file metadata when no file ID is supplied. List mode supports purpose filtering and provider cursor pagination.
>
> #### Input Parameters
>
> **after** `string`
>
> In list mode, return the page after this file ID. When has\_more is true, pass the final files\[].id from the previous response.
>
> **limit** `integer`
>
> In list mode, maximum number of files for the provider to return.
>
> **file\_id** `string`
>
> Exact file ID to inspect; omit to return one provider-default page of project files.
>
> **purpose** `string`
>
> In list mode, return only files uploaded for this purpose.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Submit Batch
>
> **Slug:** `LLM_API_SUBMIT_BATCH`
>
> Create an asynchronous batch for chat completions or responses from an existing purpose=batch file ID, or upload a JSONL input file and create the batch. If batch creation fails after upload, the tool attempts to delete the uploaded file.
>
> #### Input Parameters
>
> **endpoint** `string ("/v1/chat/completions" | "/v1/responses")` *required*
>
> Endpoint used by every JSONL request in this batch.
>
> **input\_file** `object`
>
> JSONL batch request file to upload before submission.
>
> **input\_file\_id** `string`
>
> Existing purpose=batch file ID. Provide exactly one of input\_file\_id or input\_file.
>
> **completion\_window** `string`
>
> Provider completion window. The only documented value is 24h.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
