Generate Tesla Car Wraps
Call Craftsman Agent API OneKey Router to generate Tesla Car Wrap Images and Paints that will display on 3D screen.
Quick Start
- 1. Set your environment variable
DEEPNLP_ONEKEY_ROUTER_ACCESS. - Use the CLI (primary suggested method) or the provided scripts.
Usage
1. CLI (Recommended)
CLI Illustration
onekey agent <unique_id> <api_id> $JSON --timeout 30000
- -
<unique_id>: the unique identifier of the onekey routed agents, "owner/repo". - INLINECODE2 : refers to the unique endpoint name of API.
- INLINECODE3 : the json string passed to cli.
- INLINECODE4 : controlls the timeout of API calling, unit is mill seconds.
Example
CODEBLOCK1
2. Python REST API
CODEBLOCK2
3. TypeScript REST API
CODEBLOCK3
Authentication
Remember to set the environment variable:
export DEEPNLP_ONEKEY_ROUTER_ACCESS=YOUR_ACCESS_KEY
Get your key at
DeepNLP Workspace.
Demo Result
CODEBLOCK5
生成特斯拉汽车贴膜
调用工匠代理API一键路由器生成特斯拉汽车贴膜图像和涂装,这些将显示在3D屏幕上。
快速开始
- 1. 设置环境变量 DEEPNLPONEKEYROUTER_ACCESS。
- 使用命令行界面(主要推荐方法)或提供的脚本。
使用方法
1. 命令行界面(推荐)
命令行界面说明
shell
onekey agent <唯一标识>
$JSON --timeout 30000
- - <唯一标识>:一键路由代理的唯一标识符,所有者/仓库。
- :API的唯一端点名称。
- $JSON:传递给命令行的JSON字符串。
- --timeout:控制API调用的超时时间,单位为毫秒。
示例
bash
export DEEPNLPONEKEYROUTER_ACCESS=您的访问密钥
onekey agent craftsman-agent/craftsman-agent generateteslawraps {prompt:我想把我的特斯拉Model YL涂装成类似赛车的样式,蓝紫色带星星的颜色,images:[],mode:basic,carmodel:teslamodelyl,outputnumber:1} --timeout 30000
2. Python REST API
bash
python3 scripts/generateteslawraps.py --prompt 我想把我的特斯拉Model YL涂装成类似赛车的样式,蓝紫色带星星的颜色 --mode basic --car-model teslamodelyl --output-number 1
3. TypeScript REST API
bash
node scripts/generateteslawraps.ts --prompt 我想把我的特斯拉Model YL涂装成类似赛车的样式,蓝紫色带星星的颜色 --mode basic --car-model teslamodelyl --output-number 1
身份验证
记得设置环境变量:
bash
export DEEPNLPONEKEYROUTER_ACCESS=您的访问密钥
在DeepNLP工作空间获取您的密钥。
演示结果
json
{success:true,text:,images:[{url:https://us-static.aiagenta2z.com/local/files-wd/onekeyllmrouter/efd67a8f-a427-4e56-8b00-c02d4eb332d5.png}]}