# APIpie AI

APIpie.ai is an AI super aggregator providing a unified API to access a vast array of AI models from leading providers, enabling cost-effective and latency-optimized solutions.

- **Category:** ai models
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 13
- **Triggers:** 0
- **Slug:** `APIPIE_AI`
- **Version:** 20260312_00

## Tools

### Anonymize Sensitive Text

**Slug:** `APIPIE_AI_ANONYMIZE_TEXT`

Anonymize sensitive entities (PII) in text for data privacy and compliance. Use this tool to detect and replace personally identifiable information like names, phone numbers, locations, and other sensitive data with truncated SHA-256 hashes. Returns both the anonymized text and mappings showing what was replaced.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | string | Yes | Text containing potentially sensitive information (PII) to be anonymized. The API will detect and replace entities like names, phone numbers, locations, etc. with truncated SHA-256 hashes. |

#### 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 Vector Collection

**Slug:** `APIPIE_AI_CREATE_VECTOR_COLLECTION`

Create a new vector collection (Pinecone-style index and namespace combined) in APIpie. Use this when you need to set up a new vector database for storing embeddings with a specific dimension. The dimension must match the embedding model you'll use (e.g., 1536 for OpenAI text-embedding-ada-002).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `dimension` | integer | Yes | Vector dimension size. Common values: 512, 768, 1536, 3072. Must match the embedding model dimension you plan to use. |
| `collection_name` | string | Yes | Name for the vector collection. Must be unique within your account. |

#### 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 state

**Slug:** `APIPIE_AI_DELETE_STATE`

Tool to delete state settings from APIpie. Without query parameter deletes app-level state; with query parameter deletes specific user state. Use after configuring state to remove unwanted state records or reset configuration.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user` | string | No | Optional. If provided, delete state for the specified user. If omitted, delete all state records for this API key/app. |
| `app_name` | string | No | Optional. Enables the ability for centralized API key state management for enterprises. |

#### 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 Vectors

**Slug:** `APIPIE_AI_DELETE_VECTORS`

Delete vectors from a vector collection in APIpie. Use this tool to: - Delete ALL vectors in a collection: set delete_all=True (requires credits) - Delete specific vectors: set delete_all=False and provide a list of vector IDs Note: Deleting by metadata filter is not currently supported - you must specify vector IDs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ids` | array | No | List of vector IDs to delete. Required when delete_all=False. Example: ['vec-001', 'vec-002']. |
| `filter` | object | No | Reserved for future use. Metadata filter for deletion is not currently supported by the API. |
| `delete_all` | boolean | No | If True, deletes ALL vectors in the collection (requires credits). If False, you must provide 'ids' to specify which vectors to delete. |
| `collection_name` | string | Yes | Name of the vector collection to delete from. Must match an existing collection. |

#### 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 Detailed Models

**Slug:** `APIPIE_AI_GET_DETAILED_MODELS`

Fetch detailed information about available AI models including pricing, capabilities, and specifications. Use when you need comprehensive model data with pricing rates, token limits, modality support, and benchmark scores.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `type` | string | No | Filter by type of model (llm, vision, embedding, image, voice, moderation, code) |
| `model` | string | No | Filter by model name |
| `provider` | string | No | Filter by provider (e.g., openai, anthropic) |

#### 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 query history

**Slug:** `APIPIE_AI_GET_QUERY_HISTORY`

Tool to retrieve historic API usage logs including latency, token counts, costs, and source IP. Use after authenticating to analyze past queries for cost management, performance monitoring, or auditing.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Limits the number of returned queries per page. |
| `offset` | integer | No | Offset used for pagination. |

#### 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 state

**Slug:** `APIPIE_AI_GET_STATE`

Tool to retrieve current state settings including user preferences, memory configuration, and routing settings. Use when you need to check or audit the current configuration for an app or specific user.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user` | string | No | Optional. If provided, returns the state for the specified user. If omitted, returns the app-level (master) state for the current API key/app. |
| `app_name` | string | No | Optional. Enables the ability for centralized API key state management for enterprises. |

#### 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 AI Models

**Slug:** `APIPIE_AI_LIST_MODELS`

Fetch a list of available AI models from APIPie. Use this tool when you need: - Up-to-date model listings with filtering by type, subtype, or provider - Voice model listings (set voices=true) - Country restriction information (set restrictions=true) Returns models with pricing, latency, availability, and capability information.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `type` | string ("llm" | "vision" | "embedding" | "image" | "voice" | "moderation" | "coding" | "free") | No | Filter by model type (e.g., 'llm' for language models) |
| `voices` | boolean | No | Set to true to retrieve only voice models list (use as flag) |
| `enabled` | integer ("0" | "1") | No | Filter by enabled status (1 for enabled, 0 for disabled) |
| `subtype` | string ("chat" | "fill-mask" | "question-answering" | "tts" | "stt" | "multimodal") | No | Filter by model subtype (e.g., 'chat') |
| `provider` | string | No | Filter by provider (e.g., 'openrouter') |
| `combination` | string | No | Filter by provider and subtype combination (e.g., 'provider=openrouter&subtype=chat') |
| `restrictions` | boolean | No | Set to true to retrieve only country restrictions list (use as flag) |

#### 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 Vector Collections

**Slug:** `APIPIE_AI_LIST_VECTOR_COLLECTIONS`

Tool to retrieve a list of all vector collections under your account. Use when you need to view available collections before performing vector operations like querying, upserting, or deleting vectors.

#### 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 |

### Parse Document

**Slug:** `APIPIE_AI_PARSE_DOCUMENT`

Tool to parse document content and metadata using Apache Tika. Extract text and metadata from various document formats (PDF, DOCX, TXT, etc.). Use when you need to extract readable text or metadata from uploaded documents.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | object | Yes | Document file to parse. |
| `content` | boolean | No | Extract text content from document. Defaults to true. |
| `metadata` | boolean | No | Extract metadata from document. Defaults to true. |

#### 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 |

### Transcribe audio to text

**Slug:** `APIPIE_AI_TRANSCRIBE_AUDIO`

Tool to transcribe audio files to text using AI speech-to-text models like Whisper. Use when you need to convert spoken audio into written text. Supports multiple models and output formats.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | object | Yes | Audio file to transcribe (max 25MB). |
| `model` | string ("whisper-1" | "gpt-4o-transcribe" | "gpt-4o-mini-transcribe") | Yes | Model to use for transcription. Options: whisper-1 (OpenAI), gpt-4o-transcribe, gpt-4o-mini-transcribe. |
| `prompt` | string | No | Optional text prompt to guide the model and improve transcription quality. Can include specific terminology or context. |
| `stream` | boolean | No | Whether to stream the response. Set to true for streaming transcription output. |
| `language` | string | No | ISO 639-1 or 639-3 language code of the audio (e.g., 'en', 'es', 'fr'). Helps improve transcription accuracy. |
| `temperature` | number | No | Sampling temperature between 0 and 1. Lower values make output more deterministic. |
| `response_format` | string ("json" | "text" | "srt" | "verbose_json" | "vtt") | No | Response format options for transcription. |
| `timestamp_granularities` | array | No | Timestamp granularity for transcription. Only works with whisper-1 model when response_format is 'verbose_json'. Options: 'word', 'segment'. |

#### 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 State Settings

**Slug:** `APIPIE_AI_UPDATE_STATE`

Tool to create or update state settings in APIpie, including configurations, deletions, and feature toggling at app or user levels. Use when you need to manage persistent state for AI completions, memory, routing, or other APIpie features.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user` | string | No | Required when enable_user_states=true. Identifies the end-user for user-scoped state. |
| `delete` | array | No | Keys to remove from existing settings (partial delete). Use POST to perform partial key deletes. |
| `app_name` | string | No | Optional. Enables centralized API key state management for enterprises. |
| `gui_only` | boolean | No | When true, state configuration can only be performed through APIpie GUI and cannot be edited via API or inline CLI. |
| `settings` | object | No | Settings persisted per user or per app (API key) depending on scope. |
| `enable_inline_cli` | boolean | No | Enable command line CLI for state management at the prompt. Use ':help' in prompt to any LLM for details. |
| `enable_user_states` | boolean | No | If true, scope is per-user (user_id + user). If false, scope is per-app (user_id + app label). |

#### 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 |

### Upload File

**Slug:** `APIPIE_AI_UPLOAD_FILE`

Upload a file to APIPie and retrieve a temporary URL. Use when you need to upload an image file and get a shareable URL. Supports image formats (.png, .jpg, .jpeg, .svg, .gif, .bmp, .tif, .tiff, .webp) with a maximum size limit of 5MB.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | object | Yes | File to upload. Supported formats:.png.jpg.jpeg.svg.gif.bmp.tif.tiff.webp. Max size: 5MB. |

#### 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 |
