health.auth-check
Checks that API key, consumer, capability, and permission wiring are valid.
GET /api/v1/health/auth-check
Integration reference for the current MaYi's MaaS public API. The page covers authentication, capability grants, request contracts, response shapes, async job polling, and error formats.
API key must come from a MaaS admin. Ask for a maas_test_ or maas_live_ key with the capability permissions required by the endpoint you will call.
External agents should use the Production base URL: https://maas.flyingant.win.
Every protected /api/v1 route requires Authorization: Bearer <api-key>. JSON routes also require Content-Type: application/json.
Call GET /api/v1/health/auth-check before capability calls. A successful response confirms the key, consumer, capability, and permission wiring.
Use the endpoint cards or OpenAPI JSON for the exact request fields. Match your key permissions to the capability key listed for that endpoint.
Image, video, and audio create routes return a jobId instead of final output. Send Idempotency-Key on the create request. Poll GET /api/v1/jobs/{jobId} with the same bearer key until the job reaches a terminal status.
curl -i https://maas.flyingant.win/api/v1/health/auth-check \
-H "Authorization: Bearer <api-key>"curl -i https://maas.flyingant.win/api/v1/<capability-route> \
-H "Authorization: Bearer <api-key>" \
-H "Content-Type: application/json" \
-d '{...}'health.auth-check
Checks that API key, consumer, capability, and permission wiring are valid.
GET /api/v1/health/auth-check
file.upload
Uploads supported files to public Cloudflare R2 through the MaaS server.
POST /api/v1/files/upload
slack.notify
Posts manual API-triggered messages to a requested Slack channel.
POST /api/v1/slack/notify
chat
Runs controlled single-turn chat calls through MaaS LLM providers.
POST /api/v1/chat
responses.create
Runs controlled Responses API calls with MaaS-allowlisted tools.
POST /api/v1/responses
text.polish
Polishes submitted text through the MaaS text-polish provider path.
POST /api/v1/text/polish
information.extract
Extracts information from text and image URLs into Markdown.
POST /api/v1/information/extract
image.generate
Generates images through Doubao Ark or OpenAI image providers.
POST /api/v1/images/generate
video.generate
Creates async Seedance video generation jobs.
POST /api/v1/videos/generate
audio.transcribe
Creates async Doubao ASR transcription jobs.
POST /api/v1/audio/transcriptions
Protected route failures use a stable JSON error envelope with a trace id. The HTTP status depends on the error code; examples include 401 for missing or invalid API keys, 403 for denied permissions, 429 for quota failures, 502 for upstream provider failures, and 504 for provider timeouts.
{
"error": {
"code": "PERMISSION_DENIED",
"message": "API key does not have permission for this capability."
},
"traceId": "9f4d8f4c-7f57-4f4e-a684-7a99a8b4f2a0"
}Basic deployment health check.
None
application/json
None
{
"ok": true
}Payload and database readiness check.
None
application/json
None
{
"database": "ready",
"ok": true
}Verify protected API authentication and permission wiring.
Bearer API key plus enabled health.auth-check permission
application/json
health.auth-check
Authorization: Bearer <maas_test_or_live_key>{
"capabilityKey": "health.auth-check",
"consumerId": 12,
"ok": true,
"traceId": "9f4d8f4c-7f57-4f4e-a684-7a99a8b4f2a0"
}Upload a public integration file to R2.
Bearer API key plus enabled file.upload permission
multipart/form-data
file.upload
Authorization: Bearer <maas_test_or_live_key>curl -i https://maas.flyingant.win/api/v1/files/upload \
-H "Authorization: Bearer <api-key>" \
-F "file=@./sample.pdf;type=application/pdf" \
-F "prefix=documents/contracts"{
"success": true,
"url": "https://cdn.example.test/maas/documents/contracts/2026-05-20T10-00-00-000Z-a1b2c3d4e5f6.pdf"
}Post a manual Slack notification.
Bearer API key plus enabled slack.notify permission
application/json
slack.notify
Authorization: Bearer <maas_test_or_live_key>
Content-Type: application/json{
"channel": "C0123456789",
"text": "Deployment finished successfully."
}{
"success": true,
"channel": "C0123456789",
"messageTs": "1779456000.000100"
}Run a controlled single-turn chat request.
Bearer API key plus enabled chat permission
application/json
chat
Authorization: Bearer <maas_test_or_live_key>
Content-Type: application/json{
"messages": [
{
"role": "system",
"content": "Answer in concise Chinese."
},
{
"role": "user",
"content": "Explain MaaS usage accounting."
}
],
"provider": "openai",
"temperature": 0.7,
"reasoningEffort": "high"
}{
"success": true,
"result": {
"model": "gpt-5.6-sol",
"provider": "openai",
"text": "MaaS usage accounting works by..."
},
"usage": {
"inputTokens": 123,
"outputTokens": 80,
"totalTokens": 203
}
}Run a Responses request with allowlisted tools.
Bearer API key plus enabled responses.create permission
application/json
responses.create
Authorization: Bearer <maas_test_or_live_key>
Content-Type: application/json{
"input": "Find today's market-moving China tech news and cite sources.",
"inputFiles": [
{
"fileUrl": "https://files.example.com/brief.pdf"
}
],
"instructions": "Use concise Slack-friendly bullets.",
"tools": [
"web_search"
],
"toolChoice": "auto",
"includeSources": true,
"maxOutputTokens": 2000,
"provider": "doubao"
}{
"success": true,
"result": {
"id": "resp_123",
"model": "gpt-5.6-sol",
"provider": "openai",
"text": "Market-moving China tech news...",
"sources": [
{
"title": "Example News",
"url": "https://example.com/news"
}
]
},
"usage": {
"inputTokens": 123,
"outputTokens": 80,
"totalTokens": 203
}
}Polish submitted text with the MaaS text-polish provider path.
Bearer API key plus enabled text.polish permission
application/json
text.polish
Authorization: Bearer <maas_test_or_live_key>
Content-Type: application/json{
"text": "please make this email better",
"provider": "xai"
}{
"success": true,
"result": {
"model": "grok-4.5",
"provider": "xai",
"text": "Please improve this email."
},
"usage": {
"inputTokens": 123,
"outputTokens": 80,
"totalTokens": 203
}
}Extract information from text and image URLs as Markdown.
Bearer API key plus enabled information.extract permission
application/json
information.extract
Authorization: Bearer <maas_test_or_live_key>
Content-Type: application/json{
"text": "Invoice #A-100 total $42",
"imageUrls": [
"https://cdn.example.test/invoice-page-1.png"
],
"instructions": "Extract key invoice fields as a Markdown table.",
"context": "The image is the authoritative source.",
"provider": "openai"
}{
"success": true,
"result": {
"model": "gpt-5.6-sol",
"provider": "openai",
"markdown": "## Summary\n\n...\n\n## Extracted Information\n\n..."
},
"usage": {
"inputTokens": 123,
"outputTokens": 80,
"totalTokens": 203
}
}Start an async image generation job.
Bearer API key plus enabled image.generate permission
application/json
image.generate
Authorization: Bearer <maas_test_or_live_key>
Content-Type: application/json
Idempotency-Key: <8-128 printable characters>{
"prompt": "a clean studio photo of a desk lamp",
"provider": "openai",
"size": "1536x864",
"count": 1,
"quality": "auto",
"background": "auto"
}{
"success": true,
"job": {
"jobId": "job_image123",
"capabilityKey": "image.generate",
"status": "queued"
}
}Create an async video generation job.
Bearer API key plus enabled video.generate permission
application/json
video.generate
Authorization: Bearer <maas_test_or_live_key>
Content-Type: application/json
Idempotency-Key: <8-128 printable characters>{
"prompt": "A clean product video of a matte black desk lamp rotating on a white table.",
"model": "doubao-seedance-2-0-fast-260128",
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"seed": -1,
"watermark": false,
"generateAudio": true,
"imageUrls": [
"https://cdn.example.test/lamp.png"
],
"imageRole": "first_frame",
"primaryImageDetail": "high",
"returnLastFrame": true
}{
"success": true,
"job": {
"capabilityKey": "video.generate",
"createdAt": "2026-05-20T10:00:00.000Z",
"jobId": "job_video123",
"status": "submitted"
}
}Create an async audio transcription job.
Bearer API key plus enabled audio.transcribe permission
application/json
audio.transcribe
Authorization: Bearer <maas_test_or_live_key>
Content-Type: application/json
Idempotency-Key: <8-128 printable characters>{
"audioUrl": "https://cdn.example.test/audio/meeting.m4a",
"format": "m4a",
"codec": "aac",
"duration": 31.4,
"language": "zh-CN"
}{
"success": true,
"job": {
"capabilityKey": "audio.transcribe",
"createdAt": "2026-05-20T10:00:00.000Z",
"jobId": "job_audio123",
"status": "submitted"
}
}Poll an async image, video, or audio job.
Bearer API key; job must belong to the resolved consumer and caller must still have permission for the job capability
application/json
None
Authorization: Bearer <maas_test_or_live_key>{
"success": true,
"job": {
"capabilityKey": "video.generate",
"finishedAt": "2026-05-20T10:02:00.000Z",
"jobId": "job_video123",
"result": {
"providerVideoUrl": "https://provider.example.test/video.mp4",
"videoKey": "maas/video-results/job_video123.mp4",
"videoUrl": "https://cdn.example.test/maas/video-results/job_video123.mp4"
},
"status": "succeeded",
"usage": {
"quantity": 42,
"source": "provider",
"unit": "provider_unit"
}
}
}Authenticated Payload super-admin session only. Creates a new raw API key or rotates an existing credential.