完整的API参考文档,快速接入UGOOE的AI服务
UGOOE提供RESTful API接口,支持GPT Image 2图像生成、AI对话等核心服务。所有API通过HTTPS协议访问,返回JSON格式数据。
基础URL:https://api.ugooe.cn/v1
使用您的API密钥进行身份验证,密钥可在控制台获取。
import requests API_KEY = "your-api-key-here" headers = {"Authorization": f"Bearer {API_KEY}"} # 生成图像 response = requests.post( "https://api.ugooe.cn/v1/images/generations", headers=headers, json={ "prompt": "一只在月球上打太极的熊猫,赛博朋克风格", "n": 1, "size": "1024x1024" } ) print(response.json()["data"][0]["url"])
curl -X POST https://api.ugooe.cn/v1/images/generations \ -H "Authorization: Bearer your-api-key-here" \ -H "Content-Type: application/json" \ -d '{"prompt":"赛博朋克风格的未来城市","n":1,"size":"1024x1024"}'