fd240d0ec5a3cc1537b0aa8776e7f911


Bearer fd240d0ec5a3cc1537b0aa8776e7f911

{
  "model": "jimeng-3.0",
  "prompt": "高达在宇宙中飞行",
  "negativePrompt": "",
  "width": 1024,
  "height": 1024,
  "sample_strength": 0.5
}

"GET
/
Action=ApplyImageUpload&FileSize=2603128&ServiceId=tb4s082cfz&Version=2018-08-01&s=odorxpjp67n
x-amz-date:20250529T162653Z
x-amz-security-token: 

x-amz-date;x-amz-security-token
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

def generateAuthorization(secretAccessKey, region, service, canonical_querystring, amz_date, SessionToken, date_stamp, AccessKeyID):
        signing_key = getSignatureKey(secretAccessKey, date_stamp, region, service)
        canonical_headers = 'x-amz-date:' + amz_date + '\n' + 'x-amz-security-token:' + SessionToken + '\n'
        canonical_request = "GET" + '\n' + 
        "/" + '\n' + canonical_querystring + 
        '\n' + canonical_headers + 
        '\n' + 'x-amz-date;x-amz-security-token' + 
        '\n' + hashlib.sha256("".encode("utf-8")).hexdigest()
        algorithm = 'AWS4-HMAC-SHA256'
        credential_scope = date_stamp + '/' + region + '/' + service + '/' + 'aws4_request'
        string_to_sign = algorithm + '\n' +  amz_date + '\n' +  credential_scope + '\n' +  
        hashlib.sha256(canonical_request.encode("utf-8")).hexdigest()
        Signature = hmac.new(signing_key, string_to_sign.encode("utf-8"), hashlib.sha256).hexdigest()
        data = f"AWS4-HMAC-SHA256 Credential={AccessKeyID}/{date_stamp}/{region}/{service}/aws4_request, SignedHeaders=x-amz-date;x-amz-security-token, Signature={Signature}"
        return data
