Get the agent schema
curl --request GET \
--url https://sandbox.voice.miraiminds.co/v2/agents/schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox.voice.miraiminds.co/v2/agents/schema"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const url = 'https://sandbox.voice.miraiminds.co/v2/agents/schema';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"openapi": "3.1.0",
"info": {
"title": "Mirai agent API",
"version": "2026-10-07.secondary-languages"
},
"x-scope": "Agent configuration only. Other product routes are not inventoried by this document.",
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
},
"schemas": {
"FlowValidation": {
"type": "object",
"properties": {
"ok": {
"const": true
},
"flow_revision": {
"type": "string"
},
"nodes": {
"type": "integer"
},
"edges": {
"type": "integer"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"paths": {
"/v2/agents/flow/validate": {
"post": {
"summary": "Validate a graph without saving it: the graph rules and the caller's tier model. Input_schema declarations are checked when the graph is saved on an agent.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Flow"
}
}
}
},
"responses": {
"200": {
"description": "Valid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FlowValidation"
}
}
}
},
"400": {
"description": "invalid_flow with a details array."
}
}
}
}
},
"x-examples": {
"archive_agent": {
"if_revision": 2,
"archived": true
},
"restore_agent": {
"if_revision": 3,
"archived": false
}
}
}Agents
Get the agent schema
The agent API as an OpenAPI 3.1 document: every field, limit, default and error for agents, their tools and node flows, plus worked examples. Generate a client from it, or give it to a coding assistant. It needs no key. The example below is shortened; the real document is much longer.
GET
/
v2
/
agents
/
schema
Get the agent schema
curl --request GET \
--url https://sandbox.voice.miraiminds.co/v2/agents/schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox.voice.miraiminds.co/v2/agents/schema"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const url = 'https://sandbox.voice.miraiminds.co/v2/agents/schema';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"openapi": "3.1.0",
"info": {
"title": "Mirai agent API",
"version": "2026-10-07.secondary-languages"
},
"x-scope": "Agent configuration only. Other product routes are not inventoried by this document.",
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
},
"schemas": {
"FlowValidation": {
"type": "object",
"properties": {
"ok": {
"const": true
},
"flow_revision": {
"type": "string"
},
"nodes": {
"type": "integer"
},
"edges": {
"type": "integer"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"paths": {
"/v2/agents/flow/validate": {
"post": {
"summary": "Validate a graph without saving it: the graph rules and the caller's tier model. Input_schema declarations are checked when the graph is saved on an agent.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Flow"
}
}
}
},
"responses": {
"200": {
"description": "Valid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FlowValidation"
}
}
}
},
"400": {
"description": "invalid_flow with a details array."
}
}
}
}
},
"x-examples": {
"archive_agent": {
"if_revision": 2,
"archived": true
},
"restore_agent": {
"if_revision": 3,
"archived": false
}
}
}Authorizations
Your workspace secret key, sk_live_ followed by 32 hex characters. Create one in the console under Developers.
Response
200 - application/json
The contract (shortened)
⌘I