ai-model-nodejs

Generate AI text, streams, and images in Node.js backends via @cloudbase/node-sdk.

2|1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/lxb031018/qintu --skill ai-model-nodejs-lxb031018
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-model-nodejs
Source: https://github.com/lxb031018/qintu/tree/main/.codebuddy/skills/ai-model-nodejs
Command: npx skills add https://github.com/lxb031018/qintu --skill ai-model-nodejs-lxb031018

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps developers add AI text generation, streaming responses, and image generation capabilities to Node.js backends and CloudBase cloud functions without building the integration from scratch.

Core Features & Use Cases

  • Server-side AI text generation (generateText): Produce non-streaming responses for tasks like drafting content, summarizing, and reasoning inside an API or workflow.
  • Streaming AI responses (streamText): Stream incremental output for better user experience in backends that return live partial results.
  • AI image generation (generateImage): Create images with Hunyuan Image on the server side, using the Node SDK (the only SDK here that supports image generation).
  • Use case: An Express/CloudBase endpoint receives a prompt from your mobile app, generates structured text (or a streamed answer), and optionally returns an AI-generated image URL for the client to display.

Quick Start

Configure your CloudBase function or Node server with @cloudbase/node-sdk, create an ai model instance, then call generateText or streamText for text output and generateImage with hunyuan-image for image generation.

Frequently Asked Questions about ai-model-nodejs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add AI text generation to a Node.js backend?

AI text generation in a Node.js backend is implemented by calling the generateText function with @cloudbase/node-sdk. This handles non-streaming responses for tasks like content drafting and summarizing within Express APIs or serverless workflows.

How do I implement streaming AI responses in an Express server?

Streaming AI responses in an Express server use the streamText function to stream incremental output. This provides a better user experience by returning live partial results directly from your Node.js backend.

Can I generate AI images using the CloudBase Node SDK?

AI image generation is supported in the CloudBase Node SDK using the generateImage function. It creates images server-side with Hunyuan Image, returning a URL for the client to display, a feature exclusive to this Node SDK.

What version of @cloudbase/node-sdk is required for AI generation?

AI generation requires @cloudbase/node-sdk version 3.16.0 or higher. This prerequisite ensures access to built-in providers and models like hunyuan-2.0-instruct-20251111 and deepseek-v3.2 for backend text and image workflows.

Does AI image generation work in all CloudBase SDKs?

AI image generation does not work in all CloudBase SDKs, as it is only supported in the Node SDK. You must use the Node.js backend environment and the generateImage function to execute server-side image creation successfully.