上传:参考图 A认证
POST
https://api.chatgptsb.com/runway/uploads
注意-上传的图片有时效性
请求参数
Header 参数
Content-Type
string
可选
示例值:
application/json
Authorization
string
可选
示例值:
Bearer sk-xxxx
Body 参数application/json
filename
string
文件名
numberOfParts
integer
文件数量
type
string
类型
示例
{
"filename": "163-q.jpeg",
"numberOfParts": 1,
"type": "DATASET_PREVIEW"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.chatgptsb.com/runway/uploads' \
--header 'Authorization: Bearer sk-xxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"filename": "163-q.jpeg",
"numberOfParts": 1,
"type": "DATASET_PREVIEW"
}'
返回响应
🟢200成功
application/json
Body
id
string
必需
uploadUrls
array[string]
必需
uploadHeaders
object
必需
Content-Type
string
必需
示例
{
"id": "4e806398-cd0a-48c6-9ac8-6322ed693785",
"uploadUrls": [
"https://runway-datasets.s3.us-east-1.amazonaws.com/previews/38636c93-c137-4eb7-b983-450f7d0871b1.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=ASIA5PY5AQY4YNAEKQFK%2F20240726%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240726T164242Z&X-Amz-Expires=86400&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAEaCXVzLWVhc3QtMSJHMEUCIGzXIRC8eW6QRXb4UfI3mGuXHYJhn9WsCLpfOQEdgqiuAiEA2oimEh028yuECo%2B2WoxRZSjgMHfLqNX84uszilG6JKYq8gMI2v%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAEGgw5MjcyMzY5MTY3OTMiDA9mkwGgaSsTQPwikirGA%2BtDGpYH%2FYnSinCTWmnBNbWbKYm01FbTXVXEQhqAHkqpHJ7v8ByDZzIRGmCiqj3k%2BYqYgxkYllH41hrntSCESbM9ci0M3hqypsBCDDReH%2BdEFhG20eOvx4NbnNu8DO34EcTr0XEuHvFhfBB07yBZ%2FkRfyFWAhGrn8FTbfVvTfZONoGr2fNqo31NU%2F%2Bnar%2FToszgHpweA2lVBlZlN5WFFWTSP%2FX77K%2BLW0%2BZr57J%2FzFXrWQG9Vtty9A%2Fbr%2BwcVDO9gv%2FLcRUvs8vUPxxAX5%2ByZ51f%2B8MQvENP0sV7lABj6zYhMYGl2FJO8ASo05T1zGgUod448yE7CkveenR7Jst1%2BmB%2FsD7GcY3HdctBQUYCrodcNOP1m4o51KykFZuwWnhhVx9FG53KalpwPBANgea8%2BXSLTY%2FsjPYITAOWgCoSJ%2FShEYMeJC6T3yxJC04PoBqXAP31hu10koCK7yqWYzNH89BQ4UW8cTriixI8wgAJCmaCCg1Dm3xiJAAznPw7dnPaJdNCjiIik8tM1GBgXkqwTYWzpCJBeSnQVeeBpbxd7RwGib8V3jhawYCfyIa01iw%2B7ZX9C8y3PXi2ncub4VZGj3DfafHIbacwhaCPtQY6pQGelWlBM5Ftg4cdnKOGC6wZboGLp%2BvcU5RCw9j9MoKSrZFA2iQEl2Atnxb5CKrEBZCahy1MJI6kE%2BGQ0hNv4AwLCUvlyWIn9zcdHa162I6hFDccAkkLsr%2FQUT5sgkxqQhH6OzkdOub4sPaRXIIJbWHDqa73nd1xVScVhRvd8GP9ip8cxK0wFitt%2Fu04zr7PuMWIg8I85pEK%2FHu63XLvs5zYyZj5GMc%3D&X-Amz-Signature=c3053c853994e21fb4b9f34d2c5595129344b1ed2606dc953beeb120888c6e19&X-Amz-SignedHeaders=host&x-id=PutObject"
],
"uploadHeaders": {
"Content-Type": "image/jpeg"
}
}
修改于 2024-11-26 03:11:04