# APIpie AI — how to use (mcp.ai)

Connect your APIpie AI account and use 13 tools for AI models straight from your AI agent. Connect with your own API key. 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.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_apipie_ai?ms=1787291340000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `apipie_ai_anonymize_text`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/apipie_ai`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/apipie_ai/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/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 sens
  - body: { text: string }
- `POST https://api.mcp.ai/api/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 dim
  - body: { dimension: integer, collection_name: string }
- `POST https://api.mcp.ai/api/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 recor
  - body: { user?: string, app_name?: string }
- `POST https://api.mcp.ai/api/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 pr
  - body: { ids?: string[], filter?: object, delete_all?: boolean, collection_name: string }
- `POST https://api.mcp.ai/api/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,
  - body: { type?: string, model?: string, provider?: string }
- `POST https://api.mcp.ai/api/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 auditin
  - body: { limit?: integer, offset?: integer }
- `POST https://api.mcp.ai/api/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 use
  - body: { user?: string, app_name?: string }
- `POST https://api.mcp.ai/api/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) - Countr
  - body: { type?: string, voices?: boolean, enabled?: integer, subtype?: string, provider?: string, combination?: string, restrictions?: boolean }
- `POST https://api.mcp.ai/api/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.
- `POST https://api.mcp.ai/api/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 fr
  - body: { file: object, content?: boolean, metadata?: boolean }
- `POST https://api.mcp.ai/api/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.
  - body: { file: object, model: string, prompt?: string, stream?: boolean, language?: string, temperature?: number, response_format?: string, timestamp_granularities?: string[] }
- `POST https://api.mcp.ai/api/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, mem
  - body: { user?: string, delete?: string[], app_name?: string, gui_only?: boolean, settings?: object, enable_inline_cli?: boolean, enable_user_states?: boolean }
- `POST https://api.mcp.ai/api/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
  - body: { file: object }

## Example prompts
- "What can I do in APIpie AI?"
- "Show me a summary of my APIpie AI account"

## More
- Page: https://mcp.ai/apipie_ai
- Agent spec (llms.txt): https://mcp.ai/apipie_ai/llms.txt
- Postman collection: https://mcp.ai/apipie_ai/postman.json
