Skip to main content

Quickstart

The r-mad.ai API covers OpenAI-compatible chat completions and audio transcription (with intent/BANT/NEAT-P extraction), both authenticated with the same API key issued to your organization. (Genesys Cloud's Summarization Connector and AudioHook streaming-transcription connector are separate, dashboard-configured integrations — see Authentication and their API references if you're troubleshooting one.)

1. Get an API key​

Sign in to the dashboard, open API Keys, and create a key. The full secret is shown once — store it somewhere safe, since only the last four characters are retrievable afterwards.

2. Make a request​

return_markdown is required on every request — set it to true if you want the reply formatted as Markdown (headings, lists, code blocks, etc.), or false for plain prose. A request that omits it gets a 400.

curl https://api.r-mad.ai/api/llm/chat/completions \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "Say hello in one sentence."}
],
"return_markdown": false
}'
import requests

response = requests.post(
"https://api.r-mad.ai/api/llm/chat/completions",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"messages": [
{"role": "user", "content": "Say hello in one sentence."},
],
"return_markdown": False,
},
)
print(response.json()["choices"][0]["message"]["content"])
const response = await fetch("https://api.r-mad.ai/api/llm/chat/completions", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
messages: [{role: "user", content: "Say hello in one sentence."}],
return_markdown: false,
}),
});
const data = await response.json();
console.log(data.choices[0].message.content);

3. Read the response​

{
"id": "chatcmpl-...",
"object": "chat.completion",
"created": 1735689600,
"choices": [
{
"index": 0,
"message": {"role": "assistant", "content": "Hello! Hope you're having a great day."},
"finish_reason": "stop"
}
],
"usage": {"prompt_tokens": 12, "completion_tokens": 11, "total_tokens": 23}
}

That's it — no model field to choose or manage, no separate tool-configuration step. Your org's system prompt (if any) and MCP integration (if any) are both applied automatically.

4. Transcribe audio​

Same key, a different endpoint — sent as multipart/form-data rather than JSON, since it takes a file:

curl https://api.r-mad.ai/api/transcribe \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@call.wav" \
-F "language=en"
import requests

response = requests.post(
"https://api.r-mad.ai/api/transcribe",
headers={"X-API-Key": "YOUR_API_KEY"},
files={"file": open("call.wav", "rb")},
data={"language": "en"},
)
print(response.json()["text"])

The response includes the transcript, timestamped segments, and a customer-intent classification by default; pass extract_bant=true and/or extract_neat=true to also get a BANT and/or NEAT-P sales-qualification record — they're independent frameworks, not alternatives, so you can request either, both, or neither. Billed separately from chat completions, in audio-minutes rather than tokens — see Rate Limits. Valid language codes are listed at GET /api/languages (unauthenticated — safe to call from anywhere).

Next steps​

See Authentication, Rate Limits, and System Prompts for the details, or jump straight to the API Reference for chat completions, transcription, streamed token-by-token replies over Realtime Chat, or live call transcription over AudioHook.