HI AI MEETING · Guides
Let Your Coding Agent Ask an AI Meeting: API and MCP Setup
A beginner-friendly guide to connecting Hi AI Meeting through the API or as an MCP tool when a coding agent faces an important choice, such as Redis versus an in-memory cache. It covers keys, status checks, billing, and safe retry behavior.
When you hand work to a coding agent, you eventually hit a fork like this:
“Should we use Redis, or an in-memory cache?”
You can let the agent decide alone, but an important choice may deserve a closer look. On the other hand, asking a person every time can interrupt the flow.
Hi AI Meeting is not limited to the web UI. Your code or coding agent can send a question to a meeting of several AIs. This post focuses on the first connection steps. For every field and advanced setting, see the developer guide.
This is a workflow in which AI, not a human, opens a meeting and reads its outcome. A meeting result is reference material for a decision; it does not replace professional advice.
First choice: call the API, or add an MCP tool?
There are three broad ways to connect. A meeting created through the API is the same meeting room as a web meeting, so you can revisit it in “My meetings” on the web.
| What you want | How to connect |
|---|---|
| Get one judgment from your own code or automation | Use the OpenAI-compatible API, POST /v1/chat/completions, with a judgment model such as mpm-decide-standard |
| Let a coding agent call a meeting only for important decisions | Add the MCP tool, deliberate on /v1/mcp |
| Replace the coding agent's main model itself | Use an agent model such as mpm-agent-standard — this is an advanced setup; see the developer guide |
With a judgment model, one request is one meeting. It takes a few minutes and costs one meeting’s worth of credits.
This post covers the first two routes: direct API calls and the MCP tool. Replacing an agent’s main model is covered separately in the developer guide.
1. Issue an API key
After signing in, issue a personal key in the API keys tab in Settings. This is members-only.
One detail matters: the full key is shown only once, in the issuing response. After that, the list keeps only a prefix such as mpm_xxxxxxxx. If you lose the key, issue a new one. Revoke keys you no longer use in the same place.
Do not put a key in code or in a repository. Keep it in an environment variable. Every example below uses HIAI_API_KEY.
export HIAI_API_KEY="mpm_xxxxxxxx..." # Replace with the full key you received
2. Send one meeting request
This curl example comes from /developers. The question and choices are examples; the request shape itself is the actual contract.
curl https://hiai-meeting.com/v1/chat/completions \
-H "Authorization: Bearer $HIAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mpm-decide-standard",
"messages": [
{ "role": "system", "content": "Decide within the confirmed budget." },
{ "role": "user", "content": "Which do we verify first: pricing, demand, or channel?" }
],
"extra_body": {
"mpm": {
"answer_shape": "choice",
"choices": ["Pricing", "Demand", "Channel"]
}
}
}'
For a judgment request, messages becomes the meeting setup.
- The final
usermessage is the question, up to 300 characters. - The
systemmessage is the decision criteria, up to 500 characters. - Earlier messages are background material, up to 4,000 characters.
For each field, the server keeps the beginning up to its limit and cuts off the rest. This prevents the tens-of-kilobytes system prompts sent by coding agents from blocking the request.
Keep the question short in the final user message. Put the essential criteria first in the system message. Standard generation options such as temperature do not apply to judgment models.
The model ID mpm-<purpose>-<depth> maps to the same presets used on the web. Depth fast, standard, and deep mean Quick review, Balanced, and In-depth.
For optional values beyond answer_shape and choices, including cost caps, visibility, and web search, see the developer guide’s field list.
3. HTTP 200 does not necessarily mean the meeting finished
A partial run can also return finish_reason: "stop".
Do not treat HTTP 200 or finish_reason: "stop" alone as completion. A partial completion that never reached a conclusion can also arrive as stop.
Check mpm.status in the response. The code below is the Python example from /developers with a status check added.
import os
from openai import OpenAI
client = OpenAI(base_url="https://hiai-meeting.com/v1", api_key=os.environ["HIAI_API_KEY"])
answer = client.chat.completions.create(
model="mpm-decide-standard",
messages=[
{"role": "system", "content": "Decide within the confirmed budget."},
{"role": "user", "content": "Which do we verify first: pricing, demand, or channel?"},
],
extra_body={"mpm": {"answer_shape": "choice", "choices": ["Pricing", "Demand", "Channel"]}},
)
# Added here: branch on the status in the MPM extension
mpm = getattr(answer, "mpm", None) or {}
status = mpm.get("status")
if status == "completed":
print(answer.choices[0].message.content)
elif status == "partial":
print("Partial:", answer.choices[0].message.content)
elif status in ("created", "running"):
print("Still running, look up later:", mpm.get("judgment_id"))
else: # blocked (finish_reason is content_filter)
print("Not completed:", status)
If the run itself fails, with failed, the response is a 502 error rather than a 200. With an SDK, that arrives as an exception.
A request waits for at most 10 minutes. If the meeting has not finished by then, the response returns with its current in-progress status. The meeting has not stopped; it continues on the server.
Use the returned mpm.judgment_id to look it up later.
curl https://hiai-meeting.com/v1/judgments/<judgment_id> \
-H "Authorization: Bearer $HIAI_API_KEY"
The lookup result’s result includes:
- The narrative answer:
answer - The answer shape:
answer_shape - The raw result bundle:
raw
trace_url is the address that opens the full meeting on the web. The key owner must be signed in. It is based on the same meeting result as the judgment JSON downloadable from the web, but the response packaging differs.
If you worry about a dropped connection during a long meeting, you can use stream: true. The server sends a keep-alive line every 30 seconds and reports round progress.
At present, though, streaming responses do not include mpm.judgment_id. If you will need to look up the result later, a non-streaming call or the MCP route below is more convenient.
4. Check billing in the response’s usage
Every meeting opened through the API or MCP deducts credits, regardless of purpose. There is no free trial.
A status lookup, /v1/judgments/<id> or get_judgment, does not open a new meeting.
The deduction order is the same as on the web: subscription allowance is used first, then the credit balance. The actual amount deducted appears in the response’s usage.
This is the response shape from the design document. The numbers are examples.
{
"usage": {
"prompt_tokens": 0,
"completion_tokens": 12,
"total_tokens": 12,
"cost": 12.0,
"mpm": {
"allowance_percent": 12.34,
"credit_cr": 4.0
}
}
}
completion_tokens and total_tokens are the total amount handled by subscription allowance and purchased credits for this meeting, rounded to an integer in Cr. cost is that same total rounded to four decimal places.
mpm.allowance_percent shows what percentage of the monthly subscription allowance was used for this meeting. mpm.credit_cr is the amount deducted from purchased credits. In this example, it is 4 Cr.
If there is no subscription allowance, or it is zero, mpm.allowance_percent is 0.
One token is pegged to 1 Cr. That means you can enter a Cr unit price in your client’s per-token price field to estimate cost. Because of integer rounding, however, the estimate may differ from the actual deduction.
You can set a cap for each call with extra_body.mpm.cost_cap_usd.
Use idempotency_key when retrying. Sending the same request again with the same key returns the judgment already created. If the request content changes, the same key can still create a new judgment.
5. Connect a coding agent through MCP
The MCP server is a single endpoint: https://hiai-meeting.com/v1/mcp. It is a Streamable HTTP endpoint and returns one JSON response per request without a session.
It does not use a server-initiated SSE stream. That is why a GET request with a key receives 405; this behavior is allowed by the MCP specification 2025-06-18.
If the key is missing or incorrect, you receive 401 before that.
The settings below match the “Tool setup” section in /developers.
Claude Code — after adding it, you can see connection status through /mcp. See the Claude Code MCP docs for details.
claude mcp add --transport http hiai https://hiai-meeting.com/v1/mcp \
--header "Authorization: Bearer <HIAI_API_KEY>"
opencode (opencode.json) — {env:HIAI_API_KEY} is replaced with the environment variable’s value. See the opencode MCP docs.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"hiai": {
"type": "remote",
"url": "https://hiai-meeting.com/v1/mcp",
"enabled": true,
"headers": { "Authorization": "Bearer {env:HIAI_API_KEY}" }
}
}
}
Codex (~/.codex/config.toml) — bearer_token_env_var takes an environment-variable name, not the key itself. See the Codex MCP docs.
Hi AI Meeting has no Responses API (/v1/responses), so Codex connects through MCP.
# ~/.codex/config.toml
[mcp_servers.hiai]
url = "https://hiai-meeting.com/v1/mcp"
bearer_token_env_var = "HIAI_API_KEY"
Once connected, the AI agent has two tools.
deliberate: requests a judgment and immediately returnsjudgment_idandstatus. The meeting then runs for a few minutes.get_judgment: looks up the result by that ID at roughly 30-second intervals. It stops when it seescompleted,partial,blocked, orfailed.
The tool description says, “call this for contested or important decisions, not for simple lookups or routine edits.” The agent reads that guidance and decides whether to call it.
Should we choose Redis or an in-memory cache?
Here is an explanatory example. This is not an actual meeting outcome. It is an example of the input an agent might pass to deliberate.
Imagine telling an agent:
“Ask Hi AI Meeting whether the cache layer should be Redis or an in-memory cache, and organize the result so I can choose.”
The agent would call deliberate with roughly these arguments.
{
"model": "mpm-decide-standard",
"messages": [
{ "role": "user", "content": "Background: single-region API, 2 app servers, read-heavy, no ops team on call at night." },
{ "role": "system", "content": "Criteria: operating burden first, then latency. Must fit the current budget." },
{ "role": "user", "content": "Which cache should we adopt: Redis or in-process memory cache?" }
],
"extra_body": {
"mpm": {
"answer_shape": "choice",
"choices": ["Redis", "In-process memory cache"],
"cost_cap_usd": 0.5
}
}
}
The agent then calls get_judgment several times using the returned ID. It presents the selected option, each participant’s reasoning, and the remaining objections.
The final choice belongs to the human.
For how to bring this flow into real development work, continue with Handing a coding agent's implementation choices to MCP deliberate. Under “Judgment skill package” on /developers, you can also download bundles with this usage for Claude Code, Codex, opencode, and Claude.ai.

Know the limits and errors before you start
- Meetings are private by default. You can change this with
visibility: "public". - The kinds of safety checks are the same as on the web. See Before you put a question into an AI meeting, fix it in this order. Unlike the web, the API has no step where you view a warning and confirm it. Input that needs confirmation is not run automatically. Input blocked by a safety rule returns
blockedwithfinish_reason: "content_filter". 401means the key is missing, incorrect, or revoked.400means invalid input or a judgment ID that does not exist.429means calls are too frequent or too many connections are open at once.502means the judgment run failed.
There is one particularly expensive retry mistake:
Resending a request that came back as running after the 10-minute wait.
That meeting is already running on the server. If you receive created or running, do not resend it. Look it up using judgment_id.
If you are unsure whether the server received a request, such as after 429 or a network error, wait briefly and resend with the same idempotency_key and the same request content. The server returns the existing job rather than creating another meeting or deducting credits again.
If the request content or idempotency key differs, it becomes a separate job. 401 and 400 do not change with time, so do not retry them; fix the key or input instead.
For your first attempt, send one non-streaming call and inspect the returned mpm.status and judgment_id yourself. Once you can read those two values, you can add the API or MCP flow to the decisions that need it.