Skip to main content

Mini Program Growth Plan User Guide

Use Text Generation Models

The tokens gifted by the Growth Plan can be used to call text generation models directly in your mini program. Choose the SDK for your runtime environment:

Code example:

// Resource-Point plan: cloudbase or hunyuan-v3; Non-Resource-Point plan: hunyuan-v3 only
const model = ai.createModel("cloudbase"); // or "hunyuan-v3"
const res = await model.invoke({
model: "hy3", // or "hy3-preview"
messages: [{ role: "user", content: "Hello" }],
});

The two providers differ as follows:

Aspectcloudbasehunyuan-v3
Free Quota ConsumptionFree quota is consumed first when the source is allowedOnly the free quota is consumed
When Free Quota ExhaustedAutomatically falls back to plan quotaReturns an error
When Source Not AllowedAutomatically falls back to plan quotaReturns an error
Plan QuotaSupportedNot supported
Applicable PlanResource-Point plan onlyAvailable on both Resource-Point and non-Resource-Point plans
Model Togglehy3 and hy3-preview must be manually enabled in the console; can also be disabledNo enablement required; cannot be disabled
Usage Notes

The free AI Resource Pack quota from the "Mini Program Growth Plan" is only for Mini Programs and the CloudBase server-side. When using AI tools or other non-Mini Program scenarios, calling hy3, hy3-preview will be deducted from your plan quota instead.

In these scenarios, we recommend prioritizing deepseek-v4-flash, qwen3.5-flash, glm-5.2, kimi-k2.6, minimax-m3 models. See the Special Governance Announcement for details.


Use Image Generation Models

The image generation credits gifted by the Mini Program Growth Plan can be used to call the Hunyuan image generation model, which generates images from text descriptions. Image generation is only supported in server-side environments (cloud functions / cloud hosting).

A well-crafted prompt significantly improves the quality of generated images:

  • Describe the subject: "an orange cat" → "a chubby, adorable orange cat with big eyes and short legs"
  • Specify a style: add descriptors like "watercolor style", "oil painting style", "cyberpunk", or "realistic photography"
  • Describe the scene and lighting: "a sun-drenched café", "golden hour soft side lighting"
  • Specify the composition: "close-up", "bird's-eye view", "wide shot", "center-symmetric composition"

Example:

A chubby orange cat napping on a wooden windowsill in the sunshine, warm sunlight on its fluffy fur, watercolor illustration style, soft warm tones, cozy and heartwarming scene

Code example:

const imageModel = ai.createImageModel("hunyuan-image");

// Text-to-image
const res1 = await imageModel.generateImage({
model: "HY-Image-3.0-Plus-4090-Tob-v1.0",
prompt: "A cat on the grass",
size: "1024x1024",
});

// Image-to-image (requires a reference image)
const res2 = await imageModel.generateImage({
model: "HY-Image-v3.0-I2I-ToB-v1.0.1",
prompt: "Convert this photo into an oil painting style",
image_urls: ["https://example.com/reference.jpg"],
revise: { value: true },
});

Develop Mini Programs with AI Tools

Use CloudBase Skills (MCP) to let Cursor, Lobechat 🦞, OpenClaw, CodeBuddy, WorkBuddy, VS Code, Claude Code, and other AI tools directly operate CloudBase resources without manual environment setup.

Step 1, run the following command in your AI tool to install CloudBase Skills:

npx skills add tencentcloudbase/cloudbase-skills -y

Step 2, tell your AI: "Use CloudBase Skills to develop a todo mini program"

The AI will automatically handle: code generation, database creation, cloud function deployment, and more.

For detailed configuration, see CloudBase MCP/Skill Configuration Guide.


Get Help

Visit the CloudBase Community to ask questions, join communication groups, or submit tickets — 1v1 dedicated customer service available.