InfoPlatform.aiInfoPlatform.ai Docs

Integration & Connections

How 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.

Contents
Quickstart Auth & the model id OpenAI SDK LangChain cURL Connections (MCP) Reference & limits

Quickstart

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:

SettingValue
Base URLhttps://app.infoplatform.ai/api/v1
API keyan mf_sk_… key (Integrate tab → Generate API Key)
modelyour InfoPlatform.ai model id (Integrate tab → Model)

Auth & the model id

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 SDK (Python & Node)

Verified  Run against production with the official openai Python SDK — a one-line base_url swap returned a valid ChatCompletion.

Python

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

Node.js

// 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);

LangChain

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

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.

Connections (MCP)

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.

Verified  Tested against the public DeepWiki MCP server (no auth). "Test connection" performed a real MCP handshake and discovered 3 tools; a tool-capable model then called ask_question and answered grounded in the result.

1 — Add the connection

POST /api/models/<model-id>/mcp-configs
Authorization: Bearer <login-jwt>
{
  "serverName": "DeepWiki",
  "serverUrl": "https://mcp.deepwiki.com/mcp",
  "authType": "custom",
  "credentials": {}
}

2 — Test it (real handshake + tool discovery)

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…"}
  ]
}

3 — Chat — the model calls the tool

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…"
Tool-calling needs a tool-capable model. Larger/instruction-tuned models reliably emit tool calls; very small fine-tunes may not. We always discover and expose the tools; whether the model chooses to call them depends on the model.

Reference & limits

EndpointWhat it does
POST /api/v1/chat/completionsOpenAI-compatible chat completions. model = your model id.
GET /api/v1/modelsList your models (OpenAI list format).
POST /api/models/:id/mcp-configsAdd an MCP connection (credentials encrypted).
POST /api/models/:id/mcp-configs/:cfg/testReal MCP handshake → discovered tools.

InfoPlatform.ai Docs · every example verified against production · infoplatform.ai