InfoPlatform.ai DocsHow to call your fine-tuned models from your own code, and how to give them tools with MCP. Every example on this page was run against production before it was published — look for the Verified notes.
Every model exposes an OpenAI-compatible endpoint. If your code already uses the
OpenAI SDK (or LangChain, LlamaIndex, OpenCode, Cursor, or any HTTP client), the whole integration is
changing base_url:
| Setting | Value |
|---|---|
| Base URL | https://app.infoplatform.ai/api/v1 |
| API key | an mf_sk_… key (Integrate tab → Generate API Key) |
model | your InfoPlatform.ai model id (Integrate tab → Model) |
Authenticate with an mf_sk_ API key in the Authorization: Bearer header, and
pass your model id as the model field of the request. Both are on your
model's Integrate tab in the dashboard.
openai Python SDK — a one-line base_url swap returned a valid
ChatCompletion.# pip install openai
from openai import OpenAI
client = OpenAI(
base_url="https://app.infoplatform.ai/api/v1",
api_key="mf_sk_…",
)
resp = client.chat.completions.create(
model="<your-model-id>",
messages=[{"role": "user", "content": "How do I reset my password?"}],
)
print(resp.choices[0].message.content)
// npm i openai
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://app.infoplatform.ai/api/v1",
apiKey: "mf_sk_…",
});
const resp = await client.chat.completions.create({
model: "<your-model-id>",
messages: [{ role: "user", content: "How do I reset my password?" }],
});
console.log(resp.choices[0].message.content);
Point ChatOpenAI at the same base URL:
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
base_url="https://app.infoplatform.ai/api/v1",
api_key="mf_sk_…",
model="<your-model-id>",
)
print(llm.invoke("How do I reset my password?").content)
curl https://app.infoplatform.ai/api/v1/chat/completions \
-H "Authorization: Bearer mf_sk_…" \
-H "Content-Type: application/json" \
-d '{
"model": "<your-model-id>",
"messages": [{"role": "user", "content": "How do I reset my password?"}]
}'
The response is a standard OpenAI chat.completion object (id,
object, created, model, choices, usage).
GET /api/v1/models lists your models in the OpenAI list format.
Give a model its own tools with the Model Context Protocol. On the model's Connections tab, paste an MCP server URL and (optionally) credentials — stored encrypted, scoped to that one model. When you chat, we handshake with the server, discover its tools, and when your model calls one we run it over MCP and feed the result back into the answer.
ask_question
and answered grounded in the result.POST /api/models/<model-id>/mcp-configs
Authorization: Bearer <login-jwt>
{
"serverName": "DeepWiki",
"serverUrl": "https://mcp.deepwiki.com/mcp",
"authType": "custom",
"credentials": {}
}
POST /api/models/<model-id>/mcp-configs/<config-id>/test
→ {
"connected": true,
"toolCount": 3,
"tools": [
{"name": "read_wiki_structure", "description": "…"},
{"name": "read_wiki_contents", "description": "…"},
{"name": "ask_question", "description": "Ask any question about a GitHub repository…"}
]
}
Ask something the tool can answer and the model calls it automatically:
User: "Using the vercel/next.js repo, what is Next.js used for?"
# server log: [mcp] model <id> called DeepWiki/ask_question
Model: "Next.js is a React framework used for building full-stack web
applications… routing, rendering and data-fetching strategies,
performance optimizations, and backend capabilities…"
| Endpoint | What it does |
|---|---|
POST /api/v1/chat/completions | OpenAI-compatible chat completions. model = your model id. |
GET /api/v1/models | List your models (OpenAI list format). |
POST /api/models/:id/mcp-configs | Add an MCP connection (credentials encrypted). |
POST /api/models/:id/mcp-configs/:cfg/test | Real MCP handshake → discovered tools. |
stream: true) is not supported yet — it returns a clear 400. Use non-streaming for now.InfoPlatform.ai Docs · every example verified against production · infoplatform.ai