curl --request POST \
--url https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "product.jpg"
}
'import requests
url = "https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url"
payload = { "fileName": "product.jpg" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileName: 'product.jpg'})
};
fetch('https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fileName' => 'product.jpg'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url"
payload := strings.NewReader("{\n \"fileName\": \"product.jpg\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fileName\": \"product.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fileName\": \"product.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"os_bucket": "example",
"os_key": "upload/product.jpg",
"signed_url": "https://read.example.invalid/upload/product.jpg",
"url": "https://upload.example.invalid/upload/product.jpg"
},
"errcode": 200,
"errmsg": "ok",
"request_id": "example"
}Linkfox Chuhaijiang image upload URL
Request a temporary upload URL using fileName (JPG, JPEG or PNG). After success, PUT the raw image bytes to data.url with the matching image Content-Type, without an AISA or Linkfox Authorization header. A PUT response of 200, 201 or 204 confirms upload. Then pass data.os_key as osKey to POST /apis/v1/linkfox/chuhaijiang/products/image-search. data.signed_url is a temporary read URL, never the PUT target. Treat signed URLs as temporary credentials; do not publish them. Successful URL issuance costs $0.001 even if you do not subsequently upload; failed issuance is not charged.
Issue a temporary image upload URL and os_key. USD 0.001 per successful issuance; failures are not charged. PUT the image to data.url before image search.
curl --request POST \
--url https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "product.jpg"
}
'import requests
url = "https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url"
payload = { "fileName": "product.jpg" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileName: 'product.jpg'})
};
fetch('https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fileName' => 'product.jpg'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url"
payload := strings.NewReader("{\n \"fileName\": \"product.jpg\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fileName\": \"product.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fileName\": \"product.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"os_bucket": "example",
"os_key": "upload/product.jpg",
"signed_url": "https://read.example.invalid/upload/product.jpg",
"url": "https://upload.example.invalid/upload/product.jpg"
},
"errcode": 200,
"errmsg": "ok",
"request_id": "example"
}请求规范
- 方法与路径: POST /apis/v1/linkfox/chuhaijiang/upload/presigned-url
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/linkfox/chuhaijiang/upload/presigned-url
{
"operationId": "post_linkfox_apis_v1_linkfox_chuhaijiang_upload_p_96881c",
"method": "POST",
"path": "/apis/v1/linkfox/chuhaijiang/upload/presigned-url",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"request": {
"summary": "Illustrative request.",
"value": {
"fileName": "product.jpg"
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"fileName": {
"description": "Image filename including .jpg, .jpeg or .png extension.",
"minLength": 1,
"type": "string"
}
},
"required": [
"fileName"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
公开参考价格:每次成功请求 $0.001 USD。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
请求体
响应
Provider response; inspect the business status in the body.
Provider JSON response. Optional fields can be omitted; additional provider fields are preserved. This schema documents the HTTP body, excluding client-added costToken/costCredit and local cache fields.