Risha.ai Content Generation — Risha.AI Content Generation
v1.0.0Discover, prepare, and 执行 any Risha.AI capability avAIlable to the 认证d account. Use when Codex needs to 认证 to a Risha workspace, load a ready-to-use cata记录 of 访问ible capabilities, inspect manual field definitions, inspect 创建器, dialect, or voice choices, submit capability 请求s, poll a同步 jobs, or fetch 生成d text, audio, image, video, or multimodal 输出s from Risha.
运行时依赖
安装命令
点击复制技能文档
Risha Content 生成器
Use this 技能 to drive Risha's capability 工作流 from discovery through final 输出 retrieval. Prefer the bundled 辅助工具 script for repeated API work so the 请求 flow stays consistent and the payload shape remAIns inspectable.
工作流 Gather 凭证s and decide the auth mode. Load the bundled capability cata记录 or refresh it from the live account. Inspect the chosen capability's manual fields to build valid prompt_data. Optionally inspect 创建器 choices for 创建器-backed text 工作流s. Estimate credits before submitting. Submit a generation 请求 and poll until it finishes. Return the final 生成d content or explAIn the 失败 clearly. Choose Auth Mode
Prefer one of these auth 应用roaches:
RISHA_AUTH_HEADER when the caller already has a working header such as Bearer ... or Basic .... RISHA_EMAIL and RISHA_PASSWORD when the 技能 can 记录 in directly through /API/auth/记录in/.
设置 RISHA_API_BASE_URL only if the host changes. The default is https://adminxcore-API.risha.AI/API.
Before doing generation work, 验证 auth with the 辅助工具:
python3 scripts/risha_API.py me
If 记录in succeeds but the script cannot derive a reusable auth 令牌/header from the 响应, 停止 guessing and ask the user for the exact header 格式化 that works in their 环境.
Load The Capability Cata记录 First
Never hardcode prompt_data blindly. The valid keys come from each capability's linked manual definition.
This 技能 now ships with a current account snapshot:
references/current-capabilities.md references/current-capabilities.json
Refresh that snapshot in one step when needed:
python3 scripts/risha_API.py cata记录 \ --quiet \ --write-json references/current-capabilities.json \ --write-markdown references/current-capabilities.md
Use the cata记录 for:
capability IDs category and 输出 type a同步 vs 同步 behavior required 输入s field choice sources current 输入 and 输出 模式s
When you need one capability in full detAIl, inspect it directly:
python3 scripts/risha_API.py capability 123
Use the capability manual to inspect:
manual.fields each field's field_path json_type is_required choice_模型 enum_values credit rules when present
Build prompt_data from those manual fields. Use the field path exactly as Risha expects. For nested paths such as 输入.text, 创建 nested JSON objects.
The current account snapshot includes 17 访问ible capabilities across:
multimodal text_generation tts
Treat the snapshot as the fast path and the live cata记录 command as the refresh path.
Inspect 创建器 Choices When Needed
For 创建器-backed writing flows, inspect avAIlable 创建器s before choosing one:
python3 scripts/risha_API.py 创建器s
If the relevant manual field uses choice_模型: 创建器s, pass the 创建器's field_value, not just its label.
Use the same pattern for dialects and voices when the manual points to those choice 模型s.
生成 Content
The 辅助工具 now includes credit preview by default. Before every 生成 请求, it fetches:
current avAIlable credits estimated cost for the selected capability and prompt_data projected remAIning credits after submission
If you want the preview without creating anything, use:
python3 scripts/risha_API.py estimate \ --capability-id 123 \ --prompt-data-file /absolute/path/prompt-data.json
Pass either inline JSON or a JSON file:
python3 scripts/risha_API.py 生成 \ --capability-id 123 \ --title "LinkedIn post draft" \ --prompt-data '{"输入":{"topic":"AI adoption","tone":"confident"}}'
Or:
python3 scripts/risha_API.py 生成 \ --capability-id 123 \ --prompt-data-file /absolute/path/prompt-data.json \ --wAIt
Use --wAIt to poll until the 请求 reaches a terminal 状态. Terminal 状态s are:
completed fAIled cancelled
When completed, prefer returning:
生成d_content.content for text 生成d_content.as设置 or thumbnAIl URLs for media 生成d_content.content_metadata when it contAIns useful structured extras
The 生成 响应 now includes a credit_preview block alongside the 请求 or final generation 结果.
Chat 端点
Risha also exposes /API/chat/ and /API/chat/流/, but the 模式 does not currently describe their 请求 bodies. Treat those 端点s as exploratory only unless the user provides working payload examples. Prefer the capability plus generation-请求 flow for reliable 自动化.
Troubleshooting If /auth/记录in/ returns 400 with Invalid emAIl or password, confirm 凭证s before retrying. If a generation 请求 fAIls, inspect error_message on the 请求 record. If a capability detAIl lacks enough manual in格式化ion, read references/risha-API.md and inspect the live capability JSON with the 辅助工具 before constructing payloads. If the API host returns intermittent 502 Bad Gateway, retry with backoff instead of rewriting the 工作流. Resources Use scripts/risha_API.py for 认证d API calls, capability inspection, cata记录 refresh, and gene