Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Calls AI models from browser and Web apps via @cloudbase/js-sdk, with generateText and streamText, no Node.js proxy.
23% 95%+73 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 5 of 22 without it.
We want users on our CloudBase React web app to type a prompt and generate a PNG poster image using CloudBase AI's Hunyuan image generation model directly from `@cloudbase/js-sdk` in the browser. Give me the client-side `@cloudbase/js-sdk` method call to generate the image.
Explains that AI image generation is not supported directly via `@cloudbase/js-sdk` in the browser and requires the CloudBase Node.js SDK (`@cloudbase/node-sdk`) on a backend or cloud function.
This test ran on v3. v4 is the current version and hasn’t been tested on gemini-4-hydrogen yet.
3 of 3 safety checks passed
Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.
If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.
Use this skill for calling AI models in browser/Web applications via @cloudbase/js-sdk.
🧭 Runtime-plane default for Web. Any time the user's request is framed around a page, a Web app, the frontend, React/Vue/Next/Nuxt, a dashboard UI, or "add AI to my H5", this skill is the default routing target. Do NOT first propose a Node.js / cloud-function / CloudRun proxy;
@cloudbase/js-sdkcan call the model from the browser directly. Only switch toai-model-nodejsif the user explicitly asks for a backend/server call, image generation, or a scenario that truly needs server-side keys or long-running work. This decision is independent of which concrete model the user picks — model names (deepseek-*,glm-*,hunyuan-*,kimi-*, …) only affect themodelfield, not the routing plane.
Use it when you need to:
Do NOT use for:
ai-model-nodejs skillai-model-wechat skillai-model-nodejs skill (Node SDK only)http-api-cloudbase skill (it now includes the ai_model OpenAPI spec for direct HTTP calls; do NOT build a custom HTTP proxy)ai.createModel(...) argument is not a vendor / model nameRead this before writing any createModel(...) line. The single most common mistake when agents generate code for this SDK is hallucinating the argument. There are exactly four legal shapes. Anything else is a bug.
✅ Legal ai.createModel(...) argument | When to use it |
|---|---|
"cloudbase" | The main managed group for new projects (TokenHub-backed, multi-vendor pool). Vendor + concrete model go into the model field of generateText / streamText, e.g. { model: "deepseek-v4.1-flash" }. No model is enabled by default — always check DescribeAIModels first and, if the target model is missing, enable it with UpdateAIModel before calling the SDK. |
"hunyuan-v3" | Legacy plan group, being retired. Only hy3 is available and the platform adds no new models to it. Existing code keeps working — new code should use cloudbase + { model: "hy3" }. |
"hunyuan-exp" | Only if DescribeAIModels explicitly returns this older legacy builtin group for the current env. Its original default model hunyuan-2.0-instruct-20251111 is offline (2026-05-31) — never target that id. |
"custom-<your-name>" | A user-defined GroupName you onboarded via CreateAIModel. Must start with custom- (e.g. custom-kimi, custom-openai-compat). |
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.