AI驱动的API
产品介绍生成器
生成有影响力的产品描述。
提供尽可能多的产品细节和参数,以获得最佳的营销介绍(即使是以混乱的格式)。此 API 对于填充产品目录数据和高效处理批量产品非常有用。
此 API 是从事电子商务平台、产品管理系统或营销工具的开发人员的理想选择。它自动创建简洁且有影响力的产品介绍,提升产品列表的质量并提高用户参与度。用例包括为在线商店生成简短的产品描述,为宣传材料创建营销摘要,以及简化产品数据管理。
您可以使用 max_length 参数限制输出。请记住,max_length 对于语言模型来说是一个强烈的建议,而不是严格的要求,以保持结果的整体意义。
您可以通过提供 voice_tone 参数来设置您喜欢的写作风格。它可以是像 funny 或 joyous 这样的形容词,甚至可以是著名作家的名字。
仅 content 参数是必需的。
AI 工作涉及两个关键步骤:
- 提交AI任务: 通过发送工作请求来启动流程。
- 监控和接收结果: 持续检查作业状态,并在成功完成后获取最终输出。
相关SDK/库
Step 1. 提交 AI 作业请求
| 属性 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| content | String | Yes | 产品名称及其参数以生成产品介绍。 |
| language | String | No | 指定输出语言,默认为 English。 |
| max_length | Number | No | 指定介绍的最大长度,以单词数计。 |
| voice_tone | String | No | 指定输出的语气。可以是 funny 或 joyous 这样的形容词,甚至是 famous writer 的名字。 |
请求示例:
{
"content": "Razer Blade 16 Gaming Laptop: NVIDIA GeForce RTX 4090-13th Gen Intel 24-Core i9 HX CPU - 16\" Dual Mode Mini LED (4K UHD+ 120Hz & FHD+ 240Hz) - 32GB RAM - 2TB SSD - Compact GaN Charger - Windows 11 NVIDIA GEFORCE RTX 4090 GRAPHICS: Packed for pure performance with 1.50 gPD (Graphics Power Density) and delivers up to 35% more graphic power per inch than any other 16 inch gaming laptop \n13TH GEN INTEL CORE I9 13950HX PROCESSOR: From full-blown AAA gaming to full-on content creation, run resource-intensive tasks flawlessly with the most powerful mobile processor leveraging desktop-grade silicon\n NEXT GEN DUAL-MODE MINI LED DISPLAY: Switch between ultra-sharp 4K for creative work and ultra-fast refresh rates for silky-smooth gameplay, backed by 1K nits peak brightness and 100% DCI-P3 color accuracy \n 16 INCH DISPLAY IN A 15 INCH BODY: Built with similar chassis dimensions to a typical 15” gaming laptop, it's just as ultra-portable yet offers even more screen real estate—a solution that’s the best of both worlds \nULTRA-COMPACT GAN CHARGER (UP TO 330W): Stay ready to go with a charger that’s not only faster and more power-efficient than standard adapters but also up to 60% smaller \nANODIZED ALUMINUM UNIBODY: CNC-milled from a single aluminum block, the chassis achieves optimal strength-to-weight ratio and is anodized with a matte black finish for a smooth, scratch-resistant surface",
"language": "English",
"max_length": 200,
"voice_tone": "neutral"
}
响应示例:
{
"status_url": "https://sharpapi.com/api/v1/content/translate/job/status/5de4887a-0dfd-49b6-8edb-9280e468c210",
"job_id": "5de4887a-0dfd-49b6-8edb-9280e468c210"
}
Step 2. 监控并获取 AI 作业结果
端点: GET - v1/ecommerce/product_intro/job/status/:uuid
此端点用于检查请求的 API 作业的进度。
结果示例:
{
"data": {
"type": "api_job_result",
"id": "fb0a5ab0-54fe-4283-9a33-ac491962c778",
"attributes": {
"status": "success",
"type": "ecommerce_product_intro",
"result": {
"product_intro": "体验无与伦比的游戏体验,搭载 NVIDIA RTX 4090、13th Gen Intel i9、双模 4K/FHD 显示屏、32GB RAM、2TB SSD 和紧凑的 GaN 充电器的 Razer Blade 16。"
}
}
}
}