APIpie AI MCP server for AI agents

Live

BEARER TOKEN

AI MODEL ROUTING

AI

APIpie AI gives your agent a router to many AI models, plus tools around them: send chat completions, generate embeddings and images, manage vector and RAG tune collections, search and scrape the web, and search US real estate listings and job postings.

  • Per-user credentials: each call uses the actual user's access token, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
APIpie AI
agent · Acme Q3
Run
Ask a language model to summarize this changelog in 3 bullets.
S
apipie_chat_completion_create
1650ms
AI routing agent
Sent the changelog to the chosen model through APIpie and returned a 3-bullet summary of the release.
Sources: APIpie AI, 1 model
apipie
3 bullets
18:29
Message Claude...

Tools your AI model routing agent reaches for on APIpie AI, scoped per user.

CALL ANY TOOL
28 tools for AI model routing in APIpie AI: send chat completions, generate embeddings and images, manage vector collections, search the web, and search listings and jobs.
apipie_chat_completion_create
Create chat completion
Send a chat conversation to one or more language models through APIpie's router, with optional memory, RAG over a vector collection, internet search grounding and tool calling. Returns an OpenAI-style completion: id, model, choices with the assistant message, and usage. Use apipie_models_list to pick a model. Use apipie_web_search_answer for a search-grounded answer without managing messages.
Parameters
Name
Type
Required
Description
messages
array
Required
Conversation so far, oldest first. Each message has a role (system, user or assistant) and content. Example: [{"role": "user", "content": "Why is the sky blue?"}]
model
string
Required
Model to use, or up to 5 comma-separated models. See apipie_models_list. Example: gpt-4o-mini.
inline_cli
string
Optional
Enable inline CLI :commands in the prompt, true/false or a comma-separated feature list. Example: true.
integrity
integer
Optional
Answer integrity: 12 returns the best of two answers, 13 the best of three. Example: 12. One of: `12`, `13`.
max_tokens
integer
Optional
Maximum tokens to generate. Example: 1024.
mem_clear
integer
Optional
1 to delete all stored memories for mem_session now. Example: 1. One of: `0`, `1`.
mem_session
string
Optional
Memory chain ID, to keep separate memories per user or app. Example: session-4471.
memory
boolean
Optional
Keep conversation context in APIpie's integrated memory. Example: true.
provider
string
Optional
Provider to route to. Omit to let APIpie pick the most responsive provider. Example: openai.
rag_tune
string
Optional
Name of a RAG tune or vector collection to augment the query with. Example: support-docs.
routing
string
Optional
How to route when no provider is set and several serve the model, for example perf or price. Example: perf.
search_blacklist
array
Optional
Root domains the search must not use. Example: ["example.com"]
search_provider
string
Optional
Enable internet search grounding with this provider. Defaults to valyu. Example: valyu. One of: `valyu`, `google`.
search_whitelist
array
Optional
Root domains the search may use. Example: ["reuters.com", "apnews.com"]
temperature
number
Optional
Sampling temperature. Lower is more deterministic. Example: 0.7.
tool_choice
string
Optional
none, auto, or the name of a tool to force. Example: auto.
tools
array
Optional
OpenAI-style function tool definitions the model may call. Example: [{"type": "function", "function": {"name": "get_weather", "parameters": {"type": "object", "properties": {"city": {"type": "string"}}}}}]
top_p
number
Optional
Nucleus sampling cutoff. Example: 0.9.
user
string
Optional
Your end-user identifier, for per-user usage and billing observability. Example: customer-123.
vector_provider
string
Optional
Vector store to use. Use the same provider for a collection every time. Example: qdrant. One of: `pinecone`, `qdrant`.
apipie_embeddings_create
Create embeddings
apipie_image_generate
Generate image
apipie_jobs_search
Search jobs
apipie_models_detailed_list
List models detailed
apipie_models_list
List models
apipie_property_details_get
Get property details
apipie_queries_list
List queries
apipie_ragtune_collection_delete
Delete ragtune collection
apipie_ragtune_collections_list
List ragtune collections
apipie_ragtune_document_add
Add ragtune document
apipie_real_estate_coordinates_search
Search real estate coordinates
apipie_real_estate_polygon_search
Search real estate polygon
apipie_real_estate_search
Search real estate
apipie_state_delete
Delete state
apipie_state_get
Get state
apipie_state_update
Update state
apipie_text_anonymize
Text anonymize
apipie_vector_collection_create
Create vector collection
apipie_vector_collections_list
List vector collections
apipie_vector_upsert
Upsert vector
apipie_vectors_delete
Delete vectors
apipie_vectors_fetch
Fetch vectors
apipie_vectors_list
List vectors
apipie_vectors_query
Query vectors
apipie_web_scrape
Web scrape
apipie_web_search
Search web
apipie_web_search_answer
Web search answer
Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// APIpie AI tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["apipie"], toolNames: [
    "apipie_models_list",
    "apipie_chat_completion_create",
    "apipie_web_search"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "List the chat models, search the web for vector database news, and ask a model to summarize the results" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["apipie"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "List the chat models, search the web for vector database news, and ask a model to summarize the results" }],
  tools,
});

// Execute the tool call with the user's vaulted APIpie AI access token
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["apipie"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "List the chat models, search the web for vector database news, and ask a model to summarize the results" }],
  tools,
});

// Tool call runs with the user's vaulted APIpie AI access token
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["apipie"] }, pageSize: 100,
});

const agent = new Agent({
  name: "ai_routing_agent",
  model: "gemini-2.5-pro",
  instruction: "APIpie AI tools scoped to this user",
  tools,
});

await agent.run("List the chat models, search the web for vector database news, and ask a model to summarize the results");
Try these prompts
Copy any prompt into your agent. Each maps directly to a APIpie AI tool. Click to copy, paste into your agent, done.
Models and generation
Copy the prompt
Copied
List the chat models available through APIpie.
Copy the prompt
Copied
Send this paragraph to a language model and ask for a 3-bullet summary.
Copy the prompt
Copied
Generate an image of a lighthouse at dusk.
Vectors and RAG
Copy the prompt
Copied
Create a vector collection with 1536 dimensions.
Copy the prompt
Copied
Add this PDF to my RAG tune collection.
Copy the prompt
Copied
Find the 5 vectors nearest to this query vector.
Web and data
Copy the prompt
Copied
Search the web for the latest news on vector databases.
Copy the prompt
Copied
Search US listings in ZIP code 94110 under 900000.
Copy the prompt
Copied
Find remote data engineer job postings.
SEE HOW AUTH WORKS
Each user connects their own APIpie AI access token once, and Scalekit sends it with every call. Tokens stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
APIpie AI
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
APIpie AI
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
APIpie AI
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
APIpie AI
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other AI and search connectors.
GTM and RevOps Teams
Competitive intelligence briefing agent
Scans Gong calls for competitor mentions, matches each one to its Notion battlecard, and DMs every affected rep a single Slack digest per cycle. Every call runs as the PMM who owns the briefing, never a shared bot.
Test other agents
See the same per-user auth pattern across other AI and search connectors.
GTM
Competitive intelligence briefing agent
Scan Gong calls for competitor mentions, match each one to its Notion battlecard, and DM every affected rep a single Slack digest.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared APIpie AI access token looks fine in a demo. In production every model call and vector write looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared token
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
APIpie AI today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access APIpie AI as the user or through a shared token?
As the user. Each user connects their own APIpie AI access token once, and Scalekit sends it with every call. Audit logs attribute every model call, vector change, and search to that user, not a shared service account.
Where is the APIpie AI access token stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new access token. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in APIpie AI?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the model list and search tools without apipie_vectors_delete, apipie_ragtune_collection_delete, or apipie_state_delete. Scalekit also enforces scope checks before every API call.
What happens when a user revokes APIpie AI access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Can the agent search US real estate in APIpie AI?
Yes. apipie_real_estate_search searches US listings by county, neighborhood, or ZIP code, apipie_real_estate_coordinates_search searches around a latitude and longitude, apipie_real_estate_polygon_search searches inside a polygon, and apipie_property_details_get returns details for one address.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""apipie"": {
""url"": ""https://mcp.scalekit.com/apipie"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.apipie]
url = ""https://mcp.scalekit.com/apipie""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""apipie"": {
""url"": ""https://mcp.scalekit.com/apipie"",
""type"": ""http""
}
}
}