Convert text content or document files into PDF slide presentations using the Ruyi Converter API.
Base URL: https://www.nyoi.io
rk_ prefix) from a previous interaction:
a. Check identity: GET https://www.nyoi.io/api/agent/identity (X-Api-Key header)
b. If valid → proceed to "Core workflow"
c. If 403 (expired) or 401 (invalid) → obtain a new credential (step 2)GET https://www.nyoi.io/api/agent/invite-code → get an invite code
b. POST https://www.nyoi.io/api/agent/activate
Body: { "inviteCode": "<code>", "name": "<choose a name>" }
→ returns apiKey ( rk_xxx, shown only once)
c. If 409 (name taken), pick a different name
d. If 404 (no invite codes), ask user to contact the administratorThe agent identity expires after a period of inactivity (configured by the server). Each API call resets the inactivity timer. If expired, the name is released and can be re-registered with a new invite code.
Three ways to provide content:
Option 1: Plain text (most common)
json
{
"text": "# Heading\n\n## Section 1\nContent...\n\n## Section 2\nContent...",
"title": "My Presentation",
"language": "en"
}
Option 2: File URLs
json
{
"files": ["https://example.com/report.docx"],
"title": "Project Report",
"language": "en"
}
Option 3: Base64 encoded (< 10MB)
json
{
"files": ["data:application/pdf;base64,AAAA..."],
"title": "My Presentation"
}
ParameterTypeRequiredDefaultDescriptiontextstringeither text or files-Text contentfilesstring[]either text or files-File URLs or Base64 stringstitlestringno"Presentation"Slide deck titlelanguagestringno"en"Output language (ISO 639-1 code)
bash
curl -s -X POST https://www.nyoi.io/api/tools/doc-to-slides/execute \
-H "Content-Type: application/json" \
-H "X-Api-Key: <API_KEY>" \
-d '<JSON body>'
Response:
json
{
"success": true,
"data": {
"jobId": "job_xxx",
"toolId": "doc-to-slides",
"status": "pending"
}
}
bash
curl -s https://www.nyoi.io/api/jobs/<jobId>
No authentication required. Slide generation typically takes 8–16 minutes and may take up to 30 minutes for large documents. Poll every 30 seconds until status is completed or failed.
Status flow: pending -> queued -> assigned -> running -> completed / failed
On completion, artifacts[0].url contains a pre-signed download link (PDF), valid for 2 hours.
json
{
"data": {
"status": "completed",
"artifacts": [{
"type": "slides",
"url": "https://cos.example.com/output/slides.pdf?sign=xxx",
"expiresAt": "2026-03-17T20:00:00Z",
"expiresIn": 7200
}]
}
}
IMPORTANT: Do NOT just output the URL as text. You must send the PDF file through your messaging platform.
message / send / reply tool that accepts media, file, file_url, or similar parameters).artifacts[0].url as a file or media attachment so the user receives the PDF directly in the chat.The link is valid for 2 hours. If it expires, re-request GET /api/jobs/<jobId> for a fresh URL.
ScenarioStatusActionNo invite codes available404Ask user to join the Discord for help: https://discord.gg/uk6q2uPfpgInvite code already used409Claim a new code and retryName already taken409Pick a different nameAgent identity expired403Activate with a new invite codeInvalid API Key401Activate with a new invite codeDaily quota exhausted (20/day)429Inform user to try again tomorrowTool not allowed for agent403Agent accounts can only use doc-to-slidesJob still running after 30 min-Ask user to check service status or join Discord: https://discord.gg/uk6q2uPfpgJob failed-Read the error field from the job response
Use ISO 639-1 codes for the language parameter:
CodeLanguageenEnglishzh-CN中文(简体)zh-TW中文(繁體)ja日本語ko한국어esespañolfrfrançaisdeDeutschititalianoptportuguêsruрусскийarالعربية
If something isn't working or you need invite codes, join our Discord: https://discord.gg/uk6q2uPfpg
For full API reference with request/response examples, read {baseDir}/references/api-reference.md.