diff --git a/apps/detail-photocraft/apps/photocraft/src/jiansun_image_protocol.rs b/apps/detail-photocraft/apps/photocraft/src/jiansun_image_protocol.rs index def9f2c2..51e132c9 100644 --- a/apps/detail-photocraft/apps/photocraft/src/jiansun_image_protocol.rs +++ b/apps/detail-photocraft/apps/photocraft/src/jiansun_image_protocol.rs @@ -308,12 +308,15 @@ pub fn select_model(m: &Value) -> Result { } // Multipart files carry their own type; an inline field must accept a JPEG data URL. let jpeg_references = multipart || nodes.iter().all(|n| accepts(&json!(["data:image/jpeg;base64,AA=="]), &n["properties"][field], 0)); - found.push(json!({"path":path,"route":id,"field":field,"multipart":multipart,"probe":probe,"maxImages":max,"schema":schema, - "parameters":params,"jpegReferences":jpeg_references})); + let price = route["pricing"]["effective_price"].as_f64().unwrap_or(f64::INFINITY); + found.push((price, json!({"path":path,"route":id,"field":field,"multipart":multipart,"probe":probe,"maxImages":max,"schema":schema, + "parameters":params,"jpegReferences":jpeg_references}))); } } - found.sort_by_key(|p| (p["probe"] == true, p["path"] != "/extensions/v1/tasks", p["multipart"] == true)); - found.into_iter().next().ok_or("此模型当前线路的参考图契约尚未适配;请更换模型,不会尝试其他线路".into()) + let preference = |p: &Value| (p["probe"] == true, p["path"] != "/extensions/v1/tasks", p["multipart"] == true); + found.into_iter().min_by(|(a_price, a), (b_price, b)| { + a_price.total_cmp(b_price).then_with(|| preference(a).cmp(&preference(b))) + }).map(|(_, contract)| contract).ok_or("此模型当前线路的参考图契约尚未适配;请更换模型,不会尝试其他线路".into()) } fn safe_parameter(name: &str, v: &Value) -> bool { let s = v.as_str().unwrap_or(""); diff --git a/apps/detail-photocraft/apps/photocraft/src/jiansun_models.rs b/apps/detail-photocraft/apps/photocraft/src/jiansun_models.rs index 7d949f3e..d5b39035 100644 --- a/apps/detail-photocraft/apps/photocraft/src/jiansun_models.rs +++ b/apps/detail-photocraft/apps/photocraft/src/jiansun_models.rs @@ -72,21 +72,40 @@ pub(super) fn reasoning_options<'a>(protocol: &str, properties: &'a Value) -> (b (enabled, levels) } -fn completion_capability(route: &Value) -> u8 { - let capabilities = &route["chat_capabilities"]; - match capabilities["image_base64_streaming_tools"].as_str() { - Some("verified") => 2, - Some("disabled") => 0, - _ if capabilities["image_base64"] == "verified" && capabilities["streaming_tools"] == "verified" => 1, - _ => 0, - } +fn declares_image_input(row: &Value) -> bool { + row["input_modes"].as_array().is_some_and(|modes| modes.iter() + .any(|mode| matches!(mode.as_str(), Some("image" | "image_base64")))) +} + +fn allows_streaming_tools(route: &Value) -> bool { + route["chat_capabilities"]["streaming_tools"] != "disabled" + && route["invocation"]["input_schema"]["properties"]["tools"]["maxItems"] != 0 +} + +fn allows_image_tools(route: &Value) -> bool { + ["image_base64", "image_base64_streaming_tools"].iter() + .all(|field| route["chat_capabilities"][*field] != "disabled") +} + +fn token_prices(route: &Value) -> (f64, f64) { + let pricing = &route["pricing"]; + let base = pricing["token_intervals"].as_array().and_then(|tiers| { + tiers.iter().min_by_key(|tier| tier["min_tokens"].as_u64().unwrap_or(0)) + }); + let price = |field: &str| base.and_then(|tier| tier[field].as_f64()) + .or_else(|| pricing[field].as_f64()).unwrap_or(f64::INFINITY); + (price("input_price_per_million"), price("output_price_per_million")) } pub(super) fn text_model(row: &Value, key: Option<&str>) -> Option { - text_model_for(row, key, true) + select_text_model(row, key, true, true) } pub(super) fn text_model_for(row: &Value, key: Option<&str>, responses: bool) -> Option { + select_text_model(row, key, responses, false) +} + +fn select_text_model(row: &Value, key: Option<&str>, responses: bool, prefer_image: bool) -> Option { let id = row["id"].as_str().filter(|id| !id.is_empty() && id.len() <= 200)?; if retired_text_model(id) || row["status"] != "available" || row["available"] != true || !matches!(row["modality"].as_str(), Some("text" | "multimodal")) @@ -94,17 +113,23 @@ pub(super) fn text_model_for(row: &Value, key: Option<&str>, responses: bool) -> return None; } - // A model cannot inherit a capability from a different route, even on the same API. - let route = text_routes(row).filter_map(|route| { - let protocol = text_protocol(&route["invocation"], responses)?; - Some((route, protocol)) - }).max_by_key(|(route, _)| { - let preferred = route["id"] == row["default_route_option_id"]; - (completion_capability(route), preferred) - }); + let image_input = declares_image_input(row); + let preferred = |route: &Value| route["is_default"] == true + || route["id"] == row["default_route_option_id"]; + let image_preference = |route: &Value| prefer_image && image_input && allows_image_tools(route); + let route = text_routes(row).filter(|route| allows_streaming_tools(route)) + .filter_map(|route| Some((route, text_protocol(&route["invocation"], responses)?))) + .min_by(|(a, _), (b, _)| { + let (a_input, a_output) = token_prices(a); + let (b_input, b_output) = token_prices(b); + image_preference(b).cmp(&image_preference(a)) + .then(a_input.total_cmp(&b_input)).then(a_output.total_cmp(&b_output)) + .then_with(|| preferred(b).cmp(&preferred(a))) + }); let (contract, protocol, route_id) = match route { Some((route, protocol)) => (route, protocol, route["id"].as_str()), - None if row["service_offers"].is_null() => (row, text_protocol(&row["invocation"], responses)?, None), + None if row["service_offers"].is_null() && allows_streaming_tools(row) => + (row, text_protocol(&row["invocation"], responses)?, None), None => return None, }; let path = contract["invocation"]["path"].as_str()?; @@ -114,16 +139,11 @@ pub(super) fn text_model_for(row: &Value, key: Option<&str>, responses: bool) -> let require_single_tool = protocol == "openai-responses" && tool_choice["type"] == "string" && tool_choice["enum"].as_array().is_some_and(|values| values.iter().any(|value| value == "required")); let capabilities = &contract["chat_capabilities"]; - let production = completion_capability(contract); - let image_status = match capabilities["image_base64"].as_str() { - Some("verified" | "disabled" | "unverified") => capabilities["image_base64"].as_str()?, - _ if contract["input_modes"].as_array().is_some_and(|modes| modes.iter() - .any(|mode| matches!(mode.as_str(), Some("image" | "image_base64")))) => "verified", - _ => "unverified", - }; + let image_status = capabilities["image_base64"].as_str().unwrap_or("unverified"); + let image_ready = image_input && allows_image_tools(contract); Some(json!({"key":key.unwrap_or(id),"id":id,"label":id,"protocol":protocol,"path":path, - "routeId":route_id,"imageInputStatus":image_status,"supportsImageInput":production > 0 || image_status == "verified", - "productionReady":production > 0,"productionVerified":production == 2, + "routeId":route_id,"imageInputStatus":image_status,"supportsImageInput":image_ready, + "productionReady":image_ready,"productionVerified":capabilities["image_base64_streaming_tools"] == "verified", "requireSingleTool":require_single_tool,"reasoning":reasoning,"reasoningEfforts":reasoning_efforts})) } @@ -448,44 +468,69 @@ mod tests { assert!(text_model(&published, None).is_none()); } + fn priced_catalog() -> Value { + serde_json::from_str(include_str!("testdata/public-priced-routes.json")).unwrap() + } + #[test] - fn a_verified_combined_route_is_selected_without_crossing_line_capabilities() { - let default = "a3830b3b-6fa5-4a2b-80d0-9e7a1c5cf61a"; - let alternative = "3d422446-59f2-4bab-ab31-9eddee1a10e1"; - let invocation = |route: &str, path: &str, input: &str| json!({ - "method":"POST","path":path,"content_type":"application/json", - "headers":{"X-Relay-Route-Option":route}, - "authentication":{"type":"bearer","header":"Authorization"}, - "input_schema":{"properties":{"model":{},(input):{},"stream":{},"tools":{}}} - }); - let chat = invocation(default,"/v1/chat/completions","messages"); - let responses = invocation(alternative,"/v1/responses","input"); - let mut row = json!({"id":"route-model","status":"available","available":true,"modality":"multimodal", - "default_route_option_id":default,"invocation":chat, - "service_offers":[{"route_options":[ - {"id":default,"available":true,"invocation":chat, - "chat_capabilities":{"image_base64":"disabled","streaming_tools":"verified"}}, - {"id":alternative,"available":true,"invocation":responses, - "chat_capabilities":{"image_base64":"verified","streaming_tools":"unverified"}} - ]}]}); - let current = text_model(&row,None).unwrap(); - assert_eq!(current["routeId"],default); - assert_eq!(current["productionReady"],false); - let routes = &mut row["service_offers"][0]["route_options"]; - routes[1]["chat_capabilities"]["streaming_tools"] = json!("verified"); - routes[1]["chat_capabilities"]["image_base64_streaming_tools"] = json!("disabled"); - assert_eq!(text_model(&row,None).unwrap()["routeId"],default); - row["service_offers"][0]["route_options"][1]["chat_capabilities"]["image_base64_streaming_tools"] = json!("unverified"); - let trial = text_model(&row,None).unwrap(); - assert_eq!(trial["routeId"],alternative); - assert_eq!(trial["productionReady"],true); - assert_eq!(trial["productionVerified"],false); - row["service_offers"][0]["route_options"][1]["chat_capabilities"]["image_base64_streaming_tools"] = json!("verified"); - let release = text_model(&row,None).unwrap(); - assert_eq!(release["routeId"],alternative); - assert_eq!(release["protocol"],"openai-responses"); - assert_eq!(release["productionReady"],true); - assert_eq!(release["productionVerified"],true); + fn selects_the_cheapest_compatible_chat_route() { + let catalog = priced_catalog(); + let mut row = catalog["data"]["sections"][0]["models"][0].clone(); + let settings = json!({"model":"gpt-6.1-sol"}); + let authorized = ["gpt-6.1-sol".to_owned()]; + let selected = |row: &Value| { + detail_selection(&[text_model(row, None).unwrap()], &settings, &authorized).unwrap() + }; + let chosen = selected(&row); + assert_eq!(chosen["routeId"], "ec73a238-b634-429e-b137-6f7c925fbec6"); + assert_eq!(chosen["protocol"], "openai-chat"); + assert_eq!(chosen["imageInputStatus"], "unverified"); + assert_eq!(chosen["productionReady"], true); + + for route in row["service_offers"].as_array_mut().unwrap().iter_mut() + .flat_map(|offer| offer["route_options"].as_array_mut().unwrap()) + { + if route["chat_capabilities"]["streaming_tools"] == "disabled" { + route["pricing"]["token_intervals"][0]["input_price_per_million"] = json!(0.0); + } else if route["id"] == chosen["routeId"] { + route["chat_capabilities"]["image_base64_streaming_tools"] = json!("disabled"); + } + } + let alternative = selected(&row); + assert!(alternative["routeId"].as_str().unwrap().starts_with("0d3749d6-")); + assert_eq!(alternative["productionReady"], true); + assert_eq!(text_model_for(&row, None, true).unwrap()["routeId"], chosen["routeId"]); + } + + #[test] + fn uses_the_default_chat_route_when_prices_match() { + let catalog = priced_catalog(); + let mut row = catalog["data"]["sections"][0]["models"][0].clone(); + let routes = row["service_offers"].as_array_mut().unwrap(); + let default = routes.iter().flat_map(|offer| offer["route_options"].as_array().unwrap()) + .find(|route| route["is_default"] == true).unwrap().clone(); + for route in routes.iter_mut().flat_map(|offer| offer["route_options"].as_array_mut().unwrap()) { + route["pricing"] = default["pricing"].clone(); + } + routes.reverse(); + assert_eq!(text_model(&row, None).unwrap()["routeId"], default["id"]); + } + + #[test] + fn selects_the_lowest_priced_image_edit_route() { + let mut catalog = priced_catalog(); + let route = crate::jiansun_image_protocol::select(&catalog, "gpt-image-2.6-sunburst").unwrap(); + assert_eq!(route["route"], "5f6271d9-55a2-444f-a999-5165d2230ab0"); + assert_eq!(route["path"], "/v1/images/edits"); + + let model = &mut catalog["data"]["sections"][0]["models"][1]; + let cheaper = model["service_offers"].as_array_mut().unwrap().iter_mut() + .flat_map(|offer| offer["route_options"].as_array_mut().unwrap()) + .find(|route| route["invocation"]["path"] == "/v1/images/edits" + && route["pricing"]["effective_price"] == json!(0.18)).unwrap(); + cheaper["pricing"]["effective_price"] = json!(0.09); + let expected = cheaper["id"].clone(); + assert_eq!(crate::jiansun_image_protocol::select_model(model).unwrap()["route"], expected); } #[test] diff --git a/apps/detail-photocraft/apps/photocraft/src/testdata/public-priced-routes.json b/apps/detail-photocraft/apps/photocraft/src/testdata/public-priced-routes.json new file mode 100644 index 00000000..2bfad83d --- /dev/null +++ b/apps/detail-photocraft/apps/photocraft/src/testdata/public-priced-routes.json @@ -0,0 +1,94 @@ +{ + "data": { + "sections": [ + { + "models": [ + { + "id": "gpt-6.1-sol", + "status": "available", + "available": true, + "modality": "text", + "default_route_option_id": "ec73a238-b634-429e-b137-6f7c925fbec6", + "default_service_scope_id": "scope-1d689a4ebbb04d0893713a52344034e7", + "input_modes": [ + "text", + "image_url", + "image_base64" + ], + "service_offers": [ + { + "available": true, + "service_scope": { + "id": "scope-1d689a4ebbb04d0893713a52344034e7" + }, + "route_options": [ + {"id":"ec73a238-b634-429e-b137-6f7c925fbec6","available":true,"is_default":true,"pricing":{"charge_mode":"tariff","billing_mode":"token","currency":"CNY","unit":"token","input_price_per_million":0.86,"output_price_per_million":4.29,"cache_write_price_per_million":1.08,"cache_write_5m_price_per_million":1.08,"cache_write_1h_price_per_million":1.08,"cache_read_price_per_million":0.05,"token_intervals":[{"min_tokens":0,"max_tokens":272000,"tier_label":"standard","input_price_per_million":0.86,"output_price_per_million":4.29,"cache_write_price_per_million":1.08,"cache_read_price_per_million":0.05,"cache_write_1h_price_per_million":1.08},{"min_tokens":272001,"tier_label":"long_context","input_price_per_million":1.72,"output_price_per_million":6.43,"cache_write_price_per_million":2.15,"cache_read_price_per_million":0.09,"cache_write_1h_price_per_million":2.15}]},"chat_capabilities":{"image_url":"unverified","image_base64":"unverified","streaming_tools":"unverified","image_url_streaming_tools":"unverified","image_base64_streaming_tools":"unverified"},"invocation":{"method":"POST","path":"/v1/chat/completions","content_type":"application/json","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"ec73a238-b634-429e-b137-6f7c925fbec6"},"input_schema":{"additionalProperties":true,"properties":{"audio":{"type":["object","null"],"x-relay-source":"protocol"},"frequency_penalty":{"type":["number","null"],"x-relay-source":"protocol"},"function_call":{"x-relay-source":"protocol"},"functions":{"type":["array","null"],"x-relay-source":"protocol"},"logit_bias":{"type":["object","null"],"x-relay-source":"protocol"},"logprobs":{"type":["boolean","null"],"x-relay-source":"protocol"},"max_completion_tokens":{"type":["integer","null"],"x-relay-source":"protocol"},"max_tokens":{"type":["integer","null"],"x-relay-source":"protocol"},"messages":{"type":["array","null"],"x-relay-source":"protocol"},"metadata":{"type":["object","null"],"x-relay-source":"protocol"},"modalities":{"type":["array","null"],"x-relay-source":"protocol"},"model":{"type":["string","null"],"x-relay-source":"protocol"},"moderation":{"type":["object","null"],"x-relay-source":"protocol"},"n":{"type":["integer","null"],"x-relay-source":"protocol"},"parallel_tool_calls":{"type":["boolean","null"],"x-relay-source":"protocol"},"prediction":{"type":["object","null"],"x-relay-source":"protocol"},"presence_penalty":{"type":["number","null"],"x-relay-source":"protocol"},"prompt_cache_key":{"type":["string","null"],"x-relay-source":"protocol"},"prompt_cache_options":{"type":["object","null"],"x-relay-source":"protocol"},"prompt_cache_retention":{"type":["string","null"],"x-relay-source":"protocol"},"reasoning_effort":{"type":["string","null"],"x-relay-source":"protocol"},"response_format":{"type":["object","null"],"x-relay-source":"protocol"},"safety_identifier":{"type":["string","null"],"x-relay-source":"protocol"},"seed":{"type":["integer","null"],"x-relay-source":"protocol"},"service_tier":{"type":["string","null"],"x-relay-source":"protocol"},"stop":{"x-relay-source":"protocol"},"store":{"type":["boolean","null"],"x-relay-source":"protocol"},"stream":{"type":["boolean","null"],"x-relay-source":"protocol"},"stream_options":{"type":["object","null"],"x-relay-source":"protocol"},"temperature":{"type":["number","null"],"x-relay-source":"protocol"},"tool_choice":{"x-relay-source":"protocol"},"tools":{"type":["array","null"],"x-relay-source":"protocol"},"top_logprobs":{"type":["integer","null"],"x-relay-source":"protocol"},"top_p":{"type":["number","null"],"x-relay-source":"protocol"},"user":{"type":["string","null"],"x-relay-source":"protocol"},"verbosity":{"type":["string","null"],"x-relay-source":"protocol"},"web_search_options":{"type":["object","null"],"x-relay-source":"protocol"}},"type":"object"},"request_example":{"max_tokens":128,"messages":[{"content":"请用一句话回答:连接成功了吗?","role":"user"}],"model":"gpt-6.1-sol","stream":false}}}, + {"id":"ee5760f8-024f-415f-8e9f-7cbb8f1d9d32","available":true,"is_default":false,"pricing":{"charge_mode":"tariff","billing_mode":"token","currency":"CNY","unit":"token","input_price_per_million":4,"output_price_per_million":20,"cache_write_price_per_million":0,"cache_write_5m_price_per_million":0,"cache_write_1h_price_per_million":0,"cache_read_price_per_million":0.2,"token_intervals":[{"min_tokens":0,"max_tokens":272000,"tier_label":"standard","input_price_per_million":4,"output_price_per_million":20,"cache_write_price_per_million":0,"cache_read_price_per_million":0.2,"cache_write_1h_price_per_million":0},{"min_tokens":272001,"tier_label":"long-context","input_price_per_million":8,"output_price_per_million":30,"cache_write_price_per_million":0,"cache_read_price_per_million":0.4,"cache_write_1h_price_per_million":0}]},"chat_capabilities":{"image_url":"unverified","image_base64":"verified","streaming_tools":"disabled","image_url_streaming_tools":"disabled","image_base64_streaming_tools":"disabled"},"invocation":{"method":"POST","path":"/v1/chat/completions","content_type":"application/json","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"ee5760f8-024f-415f-8e9f-7cbb8f1d9d32"},"input_schema":{"additionalProperties":true,"allOf":[{"properties":{"functions":{"anyOf":[{"type":"null"},{"maxItems":0,"type":"array"}]},"logprobs":{"type":"null"},"max_completion_tokens":{"maximum":128000,"minimum":1,"type":"integer"},"max_tokens":{"maximum":128000,"minimum":1,"type":"integer"},"messages":{"items":{"properties":{"content":{"items":{"properties":{"prompt_cache_breakpoint":false,"type":{"enum":["text","image_url"]}},"type":"object"},"type":["string","null","array"]},"prompt_cache_breakpoint":false},"type":"object"},"type":"array"},"prediction":false,"prompt_cache_breakpoint":false,"prompt_cache_options":false,"prompt_cache_retention":false,"reasoning_effort":{"enum":["low","medium","high","xhigh","max",null]},"service_tier":{"enum":["auto","default",null]},"temperature":{"type":"null"},"tool_choice":{"enum":["none","auto",null]},"tools":{"anyOf":[{"type":"null"},{"maxItems":0,"type":"array"}]},"top_logprobs":{"type":"null"},"top_p":{"type":"null"}},"type":"object"}],"properties":{"audio":{"type":["object","null"],"x-relay-source":"protocol"},"frequency_penalty":{"type":["number","null"],"x-relay-source":"protocol"},"function_call":{"x-relay-source":"protocol"},"functions":{"anyOf":[{"type":"null"},{"maxItems":0,"type":"array"}]},"logit_bias":{"type":["object","null"],"x-relay-source":"protocol"},"logprobs":{"type":"null"},"max_completion_tokens":{"maximum":128000,"minimum":1,"type":"integer"},"max_tokens":{"maximum":128000,"minimum":1,"type":"integer"},"messages":{"items":{"properties":{"content":{"items":{"properties":{"prompt_cache_breakpoint":false,"type":{"enum":["text","image_url"]}},"type":"object"},"type":["string","null","array"]},"prompt_cache_breakpoint":false},"type":"object"},"type":"array"},"metadata":{"type":["object","null"],"x-relay-source":"protocol"},"modalities":{"type":["array","null"],"x-relay-source":"protocol"},"model":{"type":["string","null"],"x-relay-source":"protocol"},"moderation":{"type":["object","null"],"x-relay-source":"protocol"},"n":{"type":["integer","null"],"x-relay-source":"protocol"},"parallel_tool_calls":{"type":["boolean","null"],"x-relay-source":"protocol"},"prediction":false,"presence_penalty":{"type":["number","null"],"x-relay-source":"protocol"},"prompt_cache_breakpoint":false,"prompt_cache_key":{"type":["string","null"],"x-relay-source":"protocol"},"prompt_cache_options":false,"prompt_cache_retention":false,"reasoning_effort":{"enum":["low","medium","high","xhigh","max",null]},"response_format":{"type":["object","null"],"x-relay-source":"protocol"},"safety_identifier":{"type":["string","null"],"x-relay-source":"protocol"},"seed":{"type":["integer","null"],"x-relay-source":"protocol"},"service_tier":{"enum":["auto","default",null]},"stop":{"x-relay-source":"protocol"},"store":{"type":["boolean","null"],"x-relay-source":"protocol"},"stream":{"type":["boolean","null"],"x-relay-source":"protocol"},"stream_options":{"type":["object","null"],"x-relay-source":"protocol"},"temperature":{"type":"null"},"tool_choice":{"enum":["none","auto",null]},"tools":{"anyOf":[{"type":"null"},{"maxItems":0,"type":"array"}]},"top_logprobs":{"type":"null"},"top_p":{"type":"null"},"user":{"type":["string","null"],"x-relay-source":"protocol"},"verbosity":{"type":["string","null"],"x-relay-source":"protocol"},"web_search_options":{"type":["object","null"],"x-relay-source":"protocol"}},"type":"object"},"request_example":{"max_tokens":128,"messages":[{"content":"请用一句话回答:连接成功了吗?","role":"user"}],"model":"gpt-6.1-sol","reasoning_effort":"low","service_tier":"auto","stream":false,"tool_choice":"none"}}}, + {"id":"0d3749d6-5615-4b73-b31e-5d9947acb692","available":true,"is_default":false,"pricing":{"charge_mode":"tariff","billing_mode":"token","currency":"CNY","unit":"token","input_price_per_million":1.72,"output_price_per_million":8.58,"cache_write_price_per_million":2.15,"cache_write_5m_price_per_million":2.15,"cache_write_1h_price_per_million":2.15,"cache_read_price_per_million":0.09,"token_intervals":[{"min_tokens":0,"max_tokens":272000,"tier_label":"standard","input_price_per_million":1.72,"output_price_per_million":8.58,"cache_write_price_per_million":2.15,"cache_read_price_per_million":0.09,"cache_write_1h_price_per_million":2.15},{"min_tokens":272001,"tier_label":"long_context","input_price_per_million":3.43,"output_price_per_million":12.86,"cache_write_price_per_million":4.29,"cache_read_price_per_million":0.18,"cache_write_1h_price_per_million":4.29}]},"chat_capabilities":{"image_url":"unverified","image_base64":"unverified","streaming_tools":"unverified","image_url_streaming_tools":"unverified","image_base64_streaming_tools":"unverified"},"invocation":{"method":"POST","path":"/v1/chat/completions","content_type":"application/json","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"0d3749d6-5615-4b73-b31e-5d9947acb692"},"input_schema":{"additionalProperties":true,"properties":{"audio":{"type":["object","null"],"x-relay-source":"protocol"},"frequency_penalty":{"type":["number","null"],"x-relay-source":"protocol"},"function_call":{"x-relay-source":"protocol"},"functions":{"type":["array","null"],"x-relay-source":"protocol"},"logit_bias":{"type":["object","null"],"x-relay-source":"protocol"},"logprobs":{"type":["boolean","null"],"x-relay-source":"protocol"},"max_completion_tokens":{"type":["integer","null"],"x-relay-source":"protocol"},"max_tokens":{"type":["integer","null"],"x-relay-source":"protocol"},"messages":{"type":["array","null"],"x-relay-source":"protocol"},"metadata":{"type":["object","null"],"x-relay-source":"protocol"},"modalities":{"type":["array","null"],"x-relay-source":"protocol"},"model":{"type":["string","null"],"x-relay-source":"protocol"},"moderation":{"type":["object","null"],"x-relay-source":"protocol"},"n":{"type":["integer","null"],"x-relay-source":"protocol"},"parallel_tool_calls":{"type":["boolean","null"],"x-relay-source":"protocol"},"prediction":{"type":["object","null"],"x-relay-source":"protocol"},"presence_penalty":{"type":["number","null"],"x-relay-source":"protocol"},"prompt_cache_key":{"type":["string","null"],"x-relay-source":"protocol"},"prompt_cache_options":{"type":["object","null"],"x-relay-source":"protocol"},"prompt_cache_retention":{"type":["string","null"],"x-relay-source":"protocol"},"reasoning_effort":{"type":["string","null"],"x-relay-source":"protocol"},"response_format":{"type":["object","null"],"x-relay-source":"protocol"},"safety_identifier":{"type":["string","null"],"x-relay-source":"protocol"},"seed":{"type":["integer","null"],"x-relay-source":"protocol"},"service_tier":{"type":["string","null"],"x-relay-source":"protocol"},"stop":{"x-relay-source":"protocol"},"store":{"type":["boolean","null"],"x-relay-source":"protocol"},"stream":{"type":["boolean","null"],"x-relay-source":"protocol"},"stream_options":{"type":["object","null"],"x-relay-source":"protocol"},"temperature":{"type":["number","null"],"x-relay-source":"protocol"},"tool_choice":{"x-relay-source":"protocol"},"tools":{"type":["array","null"],"x-relay-source":"protocol"},"top_logprobs":{"type":["integer","null"],"x-relay-source":"protocol"},"top_p":{"type":["number","null"],"x-relay-source":"protocol"},"user":{"type":["string","null"],"x-relay-source":"protocol"},"verbosity":{"type":["string","null"],"x-relay-source":"protocol"},"web_search_options":{"type":["object","null"],"x-relay-source":"protocol"}},"type":"object"},"request_example":{"max_tokens":128,"messages":[{"content":"请用一句话回答:连接成功了吗?","role":"user"}],"model":"gpt-6.1-sol","stream":false}}} + ] + }, + { + "available": true, + "service_scope": { + "id": "scope-1d689a4ebbb04d0893713a52344034e7" + }, + "route_options": [ + {"id":"fc285847-523f-4b4e-b4d1-b70ad0c5044b","available":true,"is_default":false,"pricing":{"charge_mode":"tariff","billing_mode":"token","currency":"CNY","unit":"token","input_price_per_million":4,"output_price_per_million":20,"cache_write_price_per_million":0,"cache_write_5m_price_per_million":0,"cache_write_1h_price_per_million":0,"cache_read_price_per_million":0.2,"token_intervals":[{"min_tokens":0,"max_tokens":272000,"tier_label":"standard","input_price_per_million":4,"output_price_per_million":20,"cache_write_price_per_million":0,"cache_read_price_per_million":0.2,"cache_write_1h_price_per_million":0},{"min_tokens":272001,"tier_label":"long-context","input_price_per_million":8,"output_price_per_million":30,"cache_write_price_per_million":0,"cache_read_price_per_million":0.4,"cache_write_1h_price_per_million":0}]},"chat_capabilities":{"image_url":"disabled","image_base64":"verified","streaming_tools":"verified","image_url_streaming_tools":"disabled","image_base64_streaming_tools":"verified"},"invocation":{"method":"POST","path":"/v1/responses","content_type":"application/json","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"fc285847-523f-4b4e-b4d1-b70ad0c5044b"},"input_schema":{"additionalProperties":true,"allOf":[{"properties":{"input":{"anyOf":[{"type":"string"},{"items":{"if":{"properties":{"output":{"contains":{"properties":{"type":{"const":"input_image"}},"required":["type"]},"type":"array"}},"required":["output"]},"properties":{"content":{"items":{"if":{"properties":{"type":{"const":"input_image"}},"required":["type"]},"properties":{"prompt_cache_breakpoint":false,"type":{"enum":["input_text","output_text","input_image"]}},"then":{"properties":{"file_id":{"type":"null"},"image_url":{"pattern":"^data:image/[A-Za-z0-9.+-]+;base64,","type":"string"}},"required":["image_url"]},"type":"object"},"type":["string","null","array"]},"output":{"items":{"if":{"properties":{"type":{"const":"input_image"}},"required":["type"]},"properties":{"prompt_cache_breakpoint":false,"type":{"enum":["input_text","output_text","input_image"]}},"then":{"properties":{"file_id":{"type":"null"},"image_url":{"pattern":"^data:image/[A-Za-z0-9.+-]+;base64,","type":"string"}},"required":["image_url"]},"type":"object"},"type":["string","null","array"]},"prompt_cache_breakpoint":false,"type":{"not":{"enum":["input_image","input_audio","input_file","input_video"]}}},"then":{"properties":{"type":{"const":"function_call_output"}},"required":["type"]},"type":"object"},"type":"array"}]},"logprobs":{"type":"null"},"max_output_tokens":{"maximum":128000,"minimum":1,"type":"integer"},"prediction":false,"prompt_cache_breakpoint":false,"prompt_cache_options":false,"prompt_cache_retention":false,"reasoning":{"properties":{"effort":{"enum":["low","medium","high","xhigh","max",null]}},"type":"object"},"service_tier":{"enum":["auto","default",null]},"temperature":{"type":"null"},"tool_choice":{"enum":["auto","none","required"],"type":"string"},"tools":{"items":{"properties":{"type":{"const":"function"}},"type":"object"},"type":"array"},"top_logprobs":{"type":"null"},"top_p":{"type":"null"}},"type":"object"}],"properties":{"background":{"type":["boolean","null"],"x-relay-source":"protocol"},"context_management":{"x-relay-source":"protocol"},"conversation":{"x-relay-source":"protocol"},"include":{"type":["array","null"],"x-relay-source":"protocol"},"input":{"anyOf":[{"type":"string"},{"items":{"if":{"properties":{"output":{"contains":{"properties":{"type":{"const":"input_image"}},"required":["type"]},"type":"array"}},"required":["output"]},"properties":{"content":{"items":{"if":{"properties":{"type":{"const":"input_image"}},"required":["type"]},"properties":{"prompt_cache_breakpoint":false,"type":{"enum":["input_text","output_text","input_image"]}},"then":{"properties":{"file_id":{"type":"null"},"image_url":{"pattern":"^data:image/[A-Za-z0-9.+-]+;base64,","type":"string"}},"required":["image_url"]},"type":"object"},"type":["string","null","array"]},"output":{"items":{"if":{"properties":{"type":{"const":"input_image"}},"required":["type"]},"properties":{"prompt_cache_breakpoint":false,"type":{"enum":["input_text","output_text","input_image"]}},"then":{"properties":{"file_id":{"type":"null"},"image_url":{"pattern":"^data:image/[A-Za-z0-9.+-]+;base64,","type":"string"}},"required":["image_url"]},"type":"object"},"type":["string","null","array"]},"prompt_cache_breakpoint":false,"type":{"not":{"enum":["input_image","input_audio","input_file","input_video"]}}},"then":{"properties":{"type":{"const":"function_call_output"}},"required":["type"]},"type":"object"},"type":"array"}]},"instructions":{"type":["string","null"],"x-relay-source":"protocol"},"logprobs":{"type":"null"},"max_output_tokens":{"maximum":128000,"minimum":1,"type":"integer"},"max_tool_calls":{"type":["integer","null"],"x-relay-source":"protocol"},"metadata":{"type":["object","null"],"x-relay-source":"protocol"},"model":{"type":["string","null"],"x-relay-source":"protocol"},"moderation":{"type":["object","null"],"x-relay-source":"protocol"},"parallel_tool_calls":{"type":["boolean","null"],"x-relay-source":"protocol"},"prediction":false,"previous_response_id":{"type":["string","null"],"x-relay-source":"protocol"},"prompt":{"x-relay-source":"protocol"},"prompt_cache_breakpoint":false,"prompt_cache_key":{"type":["string","null"],"x-relay-source":"protocol"},"prompt_cache_options":false,"prompt_cache_retention":false,"reasoning":{"properties":{"effort":{"enum":["low","medium","high","xhigh","max",null]}},"type":"object"},"safety_identifier":{"type":["string","null"],"x-relay-source":"protocol"},"service_tier":{"enum":["auto","default",null]},"store":{"type":["boolean","null"],"x-relay-source":"protocol"},"stream":{"type":["boolean","null"],"x-relay-source":"protocol"},"stream_options":{"type":["object","null"],"x-relay-source":"protocol"},"temperature":{"type":"null"},"text":{"type":["object","null"],"x-relay-source":"protocol"},"tool_choice":{"enum":["auto","none","required"],"type":"string"},"tools":{"items":{"properties":{"type":{"const":"function"}},"type":"object"},"type":"array"},"top_logprobs":{"type":"null"},"top_p":{"type":"null"},"truncation":{"type":["string","null"],"x-relay-source":"protocol"},"user":{"type":["string","null"],"x-relay-source":"protocol"},"verbosity":{"type":["string","null"],"x-relay-source":"protocol"}},"type":"object"},"request_example":{"input":"请用一句话回答:连接成功了吗?","max_output_tokens":128,"model":"gpt-6.1-sol","reasoning":{},"service_tier":"auto","tool_choice":"auto"}}} + ] + } + ] + }, + { + "id": "gpt-image-2.6-sunburst", + "status": "available", + "available": true, + "modality": "image", + "default_route_option_id": "b12c55f3-6f71-421d-9401-97a857aa2cdf", + "default_service_scope_id": "scope-647ef17f8e2c4afd9ea3d4e97c3beb38", + "input_modes": [ + "image_base64", + "image_file", + "image_url", + "text" + ], + "service_offers": [ + { + "available": true, + "service_scope": { + "id": "scope-647ef17f8e2c4afd9ea3d4e97c3beb38" + }, + "route_options": [ + {"id":"b12c55f3-6f71-421d-9401-97a857aa2cdf","available":true,"is_default":false,"pricing":{"charge_mode":"tariff","billing_mode":"per_request","currency":"CNY","unit":"request","effective_price":0.1},"invocation":{"method":"POST","path":"/v1/images/generations","content_type":"application/json","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"b12c55f3-6f71-421d-9401-97a857aa2cdf"},"input_schema":{"additionalProperties":true,"allOf":[{"allOf":[{"anyOf":[{"properties":{"file_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^https?[:][/][/]","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^https?[:][/][/]","properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^https?[:][/][/]","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^https?[:][/][/]","properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^https?[:][/][/]","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^https?[:][/][/]","properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"images":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^https?[:][/][/]","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^https?[:][/][/]","properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":["string","array","object"]}}},{"properties":{"file_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^data:image/[^;,]+;base64,","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^data:image/[^;,]+;base64,","properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^data:image/[^;,]+;base64,","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^data:image/[^;,]+;base64,","properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^data:image/[^;,]+;base64,","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^data:image/[^;,]+;base64,","properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"images":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^data:image/[^;,]+;base64,","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^data:image/[^;,]+;base64,","properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":["string","array","object"]}}},{"properties":{"file_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^file$","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^file$","properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^file$","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^file$","properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^file$","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^file$","properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"images":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^file$","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^file$","properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":["string","array","object"]}}}]},{"if":{"anyOf":[{"required":["frame_count"]},{"required":["frame_duration_ms"]}]},"then":{"properties":{"output_format":{"const":"gif"}},"required":["output_format"]}},{"if":{"properties":{"output_format":{"const":"gif"}},"required":["output_format"]},"then":{"properties":{"mask":false,"output_compression":false,"partial_images":{"const":0},"stream":{"const":false}}}}],"properties":{"aspect_ratio":false,"background":{"enum":["opaque","auto","transparent"]},"frame_count":{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"},"image":{"maxItems":14},"input_fidelity":false,"mask":false,"n":{"const":1},"negativePrompt":false,"negative_prompt":false,"output_compression":false,"output_format":{"enum":["png","gif"],"type":"string"},"prompt":{"minLength":1,"type":"string"},"quality":{"enum":["auto","low","medium","high"],"type":"string"},"resolution":false,"response_format":{"enum":["url","b64_json"]},"size":{"pattern":"^[1-9][0-9]*x[1-9][0-9]*$","type":"string"}},"type":"object","x-image-size-aspect-ratio":"consume_if_declared_or_quantized","x-image-size-aspect-ratios":{"1024x1024":"1:1","1024x3072":"1:3","1024x768":"4:3","1120x896":"5:4","1152x2048":"9:16","1152x2688":"9:21","1152x768":"3:2","1280x3840":"1:3","1280x720":"16:9","1344x576":"21:9","1408x2816":"1:2","1408x704":"2:1","1536x2048":"3:4","1536x2304":"2:3","1536x512":"3:1","1648x3840":"9:21","1792x2240":"4:5","1920x3840":"1:2","2048x1152":"16:9","2048x1536":"4:3","2048x2048":"1:1","2160x3840":"9:16","2240x1792":"5:4","2304x1536":"3:2","2352x3520":"2:3","2480x3312":"3:4","2560x3200":"4:5","2688x1152":"21:9","2816x1408":"2:1","2880x2880":"1:1","3072x1024":"3:1","3200x2560":"5:4","3312x2480":"4:3","3520x2352":"3:2","3840x1280":"3:1","3840x1648":"21:9","3840x1920":"2:1","3840x2160":"16:9","512x1536":"1:3","576x1344":"9:21","704x1408":"1:2","720x1280":"9:16","768x1024":"3:4","768x1152":"2:3","896x1120":"4:5"},"x-image-size-limits":{"allow_auto":false,"allow_custom":true,"allow_ratio":false,"max_aspect_ratio":[3,1],"max_edge":3840,"max_pixels":8294400,"min_aspect_ratio":[1,3],"min_pixels":655360,"multiple_of":16}}],"description":"Each route is prepared independently from the original request. When the Key enables cross-source failover, eligible quality and input_fidelity preferences may be adjusted even on the preferred route if that route rejects them. Other parameters, including size and resolution, are not adjusted by this preference policy. Fallback candidates that exceed the Key's price limit are not dispatched.","properties":{"aspect_ratio":false,"background":{"enum":["opaque","auto","transparent"]},"frame_count":{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"},"image":{"description":"Optional reference image URLs. Replace each placeholder with your own image URL; omit image for text-only generation.","items":{"type":"string"},"maxItems":14,"type":"array","x-relay-source":"offer"},"input_fidelity":false,"mask":false,"model":{"type":["string","null"],"x-relay-source":"protocol"},"moderation":{"type":["string","null"],"x-relay-source":"protocol"},"n":{"const":1,"type":["integer","null"],"x-relay-source":"protocol"},"negativePrompt":false,"negative_prompt":false,"output_compression":false,"output_format":{"enum":["png","gif"],"type":"string"},"partial_images":{"type":["integer","null"],"x-relay-source":"protocol"},"prompt":{"minLength":1,"type":"string"},"quality":{"description":"Omitting quality is different from explicitly sending auto. The enum or const describes values accepted without preference adjustment. Recognized quality values eligible for adjustment are auto, low, medium, high, standard, hd, xhigh and max. When omitted, the upstream default applies unless another declared mapping supplies a value. When cross-source failover is enabled, a recognized unsupported value may be omitted; the candidate is then validated again and its default applies.","enum":["auto","low","medium","high"],"type":"string"},"resolution":false,"response_format":{"enum":["url","b64_json"]},"size":{"default":"1024x1024","enum":["1024x1024","1024x768","1120x896","1152x768","1280x720","1344x576","1408x704","1536x512","512x1536","576x1344","704x1408","720x1280","768x1024","768x1152","896x1120","2048x2048","1024x3072","1152x2048","1152x2688","1408x2816","1536x2048","1536x2304","1792x2240","2048x1152","2048x1536","2240x1792","2304x1536","2688x1152","2816x1408","3072x1024","2880x2880","1280x3840","1648x3840","1920x3840","2160x3840","2352x3520","2480x3312","2560x3200","3200x2560","3312x2480","3520x2352","3840x1280","3840x1648","3840x1920","3840x2160"],"pattern":"^[1-9][0-9]*x[1-9][0-9]*$","type":"string","x-image-size-limits":{"allow_auto":false,"allow_custom":true,"allow_ratio":false,"max_aspect_ratio":[3,1],"max_edge":3840,"max_pixels":8294400,"min_aspect_ratio":[1,3],"min_pixels":655360,"multiple_of":16},"x-relay-source":"offer"},"stream":{"type":["boolean","null"],"x-relay-source":"protocol"},"style":{"type":["string","null"],"x-relay-source":"protocol"},"user":{"type":["string","null"],"x-relay-source":"protocol"}},"type":"object"},"request_example":{"background":"opaque","model":"gpt-image-2.6-sunburst","n":1,"output_format":"png","prompt":"A clean product photo.","quality":"auto","response_format":"url","size":"1024x1024"}}}, + {"id":"2faaf734-ac7b-450c-bd78-e2bd35e1206e","available":true,"is_default":false,"pricing":{"charge_mode":"tariff","billing_mode":"per_request","currency":"CNY","unit":"request","effective_price":0.18,"video_price_tiers":[{"tokens_per_second":"0","resolution":"1K","unit":"request","price":0.18},{"tokens_per_second":"0","resolution":"2K","unit":"request","price":0.24},{"tokens_per_second":"0","resolution":"4K","unit":"request","price":0.3}],"dynamic":true},"invocation":{"method":"POST","path":"/v1/images/generations","content_type":"application/json","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"2faaf734-ac7b-450c-bd78-e2bd35e1206e"},"input_schema":{"additionalProperties":true,"allOf":[{"allOf":[{"if":{"required":["file_urls","frame_count"]},"then":{"properties":{"frame_count":{"const":9}}}},{"if":{"required":["image","frame_count"]},"then":{"properties":{"frame_count":{"const":9}}}},{"if":{"required":["images","frame_count"]},"then":{"properties":{"frame_count":{"const":9}}}},{"if":{"allOf":[{"anyOf":[{"required":["images"]},{"required":["image"]},{"required":["image[]"]}]}],"required":["frame_count"]},"then":{"properties":{"frame_count":{"const":9}}}},{"else":{"not":{"anyOf":[{"required":["frame_count"]},{"required":["frame_duration_ms"]}]}},"if":{"properties":{"output_format":{"const":"gif"}},"required":["output_format"]}},{"properties":{"images":{"maxItems":10,"type":"array"}}},{"properties":{"image":{"maxItems":10,"type":"array"}}},{"properties":{"image[]":{"maxItems":10,"type":"array"}}}],"properties":{"aspect_ratio":{"enum":["1:1","3:2","2:3","4:3","3:4","5:4","4:5","16:9","9:16","21:9"],"type":"string"},"file_urls":{"maxItems":10,"type":"array"},"frame_count":{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer"},"image":{"maxItems":10,"type":"array"},"images":{"maxItems":10,"type":"array"},"input_fidelity":false,"n":{"const":1,"type":"integer"},"output_format":{"description":"png, jpeg, webp, or gif. PNG by default.","enum":["png","jpeg","webp","gif"],"type":"string"},"resolution":{"enum":["1K","2K","4K"],"type":"string"},"response_format":{"enum":["url"],"type":"string"},"size":{"description":"Canvas size or documented source preset.","enum":["1024x1024"],"type":"string"}},"type":"object","x-failover-parameter-defaults":{}}],"description":"Each route is prepared independently from the original request. When the Key enables cross-source failover, eligible quality and input_fidelity preferences may be adjusted even on the preferred route if that route rejects them. Other parameters, including size and resolution, are not adjusted by this preference policy. Fallback candidates that exceed the Key's price limit are not dispatched.","properties":{"aspect_ratio":{"enum":["1:1","3:2","2:3","4:3","3:4","5:4","4:5","16:9","9:16","21:9"],"type":"string"},"background":{"enum":["transparent"],"type":"string","x-relay-source":"offer"},"file_urls":{"maxItems":10,"type":"array"},"frame_count":{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer","x-relay-source":"offer"},"frame_duration_ms":{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer","x-relay-source":"offer"},"image":{"description":"Optional reference image URLs. Replace each placeholder with your own image URL; omit image for text-only generation.","items":{"type":"string"},"maxItems":10,"type":"array","x-relay-source":"offer"},"images":{"maxItems":10,"type":"array"},"input_fidelity":false,"model":{"type":["string","null"],"x-relay-source":"protocol"},"moderation":false,"n":{"allOf":[{"type":["integer","null"],"x-relay-source":"protocol"},{"const":1,"type":"integer"}],"const":1,"type":"integer","x-relay-source":"offer"},"output_compression":false,"output_format":{"default":"png","description":"png, jpeg, webp, or gif. PNG by default.","enum":["png","jpeg","webp","gif"],"type":"string","x-relay-source":"offer"},"partial_images":false,"prompt":{"x-relay-source":"protocol"},"quality":{"const":"high","default":"high","description":"This source renders at high quality. Omitting quality is different from explicitly sending auto. The enum or const describes values accepted without preference adjustment. Recognized quality values eligible for adjustment are auto, low, medium, high, standard, hd, xhigh and max. When omitted, the configured route value \"high\" is applied. This route does not allow preference adjustment for this field.","type":"string","x-relay-source":"offer"},"resolution":{"default":"1K","enum":["1K","2K","4K"],"type":"string","x-relay-source":"offer"},"response_format":{"enum":["url"],"type":"string"},"size":{"description":"Canvas size or documented source preset.","enum":["1024x1024"],"type":"string","x-relay-source":"offer"},"stream":{"enum":[false,null],"type":["boolean","null"],"x-relay-source":"protocol"},"style":false,"user":false},"type":"object"},"request_example":{"aspect_ratio":"1:1","background":"transparent","model":"gpt-image-2.6-sunburst","n":1,"output_format":"png","prompt":"A clean product photo.","quality":"high","response_format":"url","size":"1024x1024","stream":false}}}, + {"id":"e451388d-2c01-4600-b0f1-a1078dc864f9","available":true,"is_default":false,"pricing":{"charge_mode":"tariff","billing_mode":"per_request","currency":"CNY","unit":"request","effective_price":0.35},"invocation":{"method":"POST","path":"/v1/images/generations","content_type":"application/json","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"e451388d-2c01-4600-b0f1-a1078dc864f9"},"input_schema":{"additionalProperties":true,"allOf":[{"properties":{"file_urls":{"type":"array"},"input_fidelity":false,"n":{"const":1,"type":"integer"},"output_format":{"description":"Animated GIF. Set output_format to gif explicitly.","enum":["gif"],"type":"string"},"response_format":{"enum":["url"],"type":"string"},"size":{"description":"Canvas size or documented source preset.","enum":["1024x1024","2048x2048","2880x2880","1280x720","2048x1152","3840x2160","720x1280","1152x2048","2160x3840","1152x864","2304x1728","3264x2448","864x1152","1728x2304","2448x3264","1536x1024","2048x1360","3504x2336","1024x1536","1360x2048","2336x3504","1120x896","2240x1792","3200x2560","896x1120","1792x2240","2560x3200","1456x624","2912x1248","3840x1648","624x1456","1248x2912","1648x3840","688x2048","1280x3840","2048x688","3840x1280","1536x768","3072x1536","3840x1920","768x1536","1536x3072","1920x3840","auto"],"type":"string"}},"required":["output_format"],"type":"object","x-failover-parameter-defaults":{},"x-image-size-aspect-ratio":"consume_if_declared","x-image-size-aspect-ratios":{"1024x1024":"1:1","1024x1536":"2:3","1120x896":"5:4","1152x2048":"9:16","1152x864":"4:3","1248x2912":"9:21","1280x3840":"1:3","1280x720":"16:9","1360x2048":"2:3","1456x624":"21:9","1536x1024":"3:2","1536x3072":"1:2","1536x768":"2:1","1648x3840":"9:21","1728x2304":"3:4","1792x2240":"4:5","1920x3840":"1:2","2048x1152":"16:9","2048x1360":"3:2","2048x2048":"1:1","2048x688":"3:1","2160x3840":"9:16","2240x1792":"5:4","2304x1728":"4:3","2336x3504":"2:3","2448x3264":"3:4","2560x3200":"4:5","2880x2880":"1:1","2912x1248":"21:9","3072x1536":"2:1","3200x2560":"5:4","3264x2448":"4:3","3504x2336":"3:2","3840x1280":"3:1","3840x1648":"21:9","3840x1920":"2:1","3840x2160":"16:9","624x1456":"9:21","688x2048":"1:3","720x1280":"9:16","768x1536":"1:2","864x1152":"3:4","896x1120":"4:5"}}],"description":"Each route is prepared independently from the original request. When the Key enables cross-source failover, eligible quality and input_fidelity preferences may be adjusted even on the preferred route if that route rejects them. Other parameters, including size and resolution, are not adjusted by this preference policy. Fallback candidates that exceed the Key's price limit are not dispatched.","properties":{"background":{"enum":["transparent"],"type":"string","x-relay-source":"offer"},"file_urls":{"type":"array"},"image":{"description":"Optional reference image URLs. Replace each placeholder with your own image URL; omit image for text-only generation.","examples":[["",""]],"items":{"type":"string"},"type":"array","x-relay-source":"offer"},"input_fidelity":false,"model":{"type":["string","null"],"x-relay-source":"protocol"},"moderation":false,"n":{"allOf":[{"allOf":[{"type":["integer","null"],"x-relay-source":"protocol"},{"const":1,"type":"integer"}],"const":1,"type":"integer"},{"const":1}]},"output_compression":false,"output_format":{"description":"Animated GIF. Set output_format to gif explicitly.","enum":["gif"],"type":"string"},"partial_images":false,"prompt":{"x-relay-source":"protocol"},"quality":{"description":"Omitting quality is different from explicitly sending auto. The enum or const describes values accepted without preference adjustment. Recognized quality values eligible for adjustment are auto, low, medium, high, standard, hd, xhigh and max. When omitted, the upstream default applies unless another declared mapping supplies a value. This route does not allow preference adjustment for this field.","enum":["auto","low","medium","high"],"type":"string","x-relay-source":"offer"},"response_format":{"enum":["url"],"type":"string"},"size":{"description":"Canvas size or documented source preset.","enum":["1024x1024","2048x2048","2880x2880","1280x720","2048x1152","3840x2160","720x1280","1152x2048","2160x3840","1152x864","2304x1728","3264x2448","864x1152","1728x2304","2448x3264","1536x1024","2048x1360","3504x2336","1024x1536","1360x2048","2336x3504","1120x896","2240x1792","3200x2560","896x1120","1792x2240","2560x3200","1456x624","2912x1248","3840x1648","624x1456","1248x2912","1648x3840","688x2048","1280x3840","2048x688","3840x1280","1536x768","3072x1536","3840x1920","768x1536","1536x3072","1920x3840","auto"],"type":"string","x-relay-source":"offer"},"stream":{"enum":[false,null],"type":["boolean","null"],"x-relay-source":"protocol"},"style":false,"user":false},"type":"object"},"request_example":{"background":"transparent","model":"gpt-image-2.6-sunburst","n":1,"output_format":"gif","prompt":"A clean product photo.","quality":"auto","response_format":"url","size":"1024x1024","stream":false}}} + ] + }, + { + "available": true, + "service_scope": { + "id": "scope-647ef17f8e2c4afd9ea3d4e97c3beb38" + }, + "route_options": [ + {"id":"5f6271d9-55a2-444f-a999-5165d2230ab0","available":true,"is_default":false,"pricing":{"charge_mode":"tariff","billing_mode":"per_request","currency":"CNY","unit":"request","effective_price":0.1},"invocation":{"method":"POST","path":"/v1/images/edits","content_type":"multipart/form-data","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"5f6271d9-55a2-444f-a999-5165d2230ab0"},"input_schema":{"additionalProperties":true,"allOf":[{"allOf":[{"anyOf":[{"properties":{"file_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^https?[:][/][/]","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^https?[:][/][/]","properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^https?[:][/][/]","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^https?[:][/][/]","properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^https?[:][/][/]","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^https?[:][/][/]","properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"images":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^https?[:][/][/]","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^https?[:][/][/]","properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":["string","array","object"]}}},{"properties":{"file_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^data:image/[^;,]+;base64,","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^data:image/[^;,]+;base64,","properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^data:image/[^;,]+;base64,","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^data:image/[^;,]+;base64,","properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^data:image/[^;,]+;base64,","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^data:image/[^;,]+;base64,","properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"images":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^data:image/[^;,]+;base64,","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^data:image/[^;,]+;base64,","properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":["string","array","object"]}}},{"properties":{"file_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^file$","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^file$","properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^file$","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^file$","properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^file$","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^file$","properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"images":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^file$","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^file$","properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":["string","array","object"]}}}]},{"if":{"anyOf":[{"required":["frame_count"]},{"required":["frame_duration_ms"]}]},"then":{"properties":{"output_format":{"const":"gif"}},"required":["output_format"]}},{"if":{"properties":{"output_format":{"const":"gif"}},"required":["output_format"]},"then":{"properties":{"mask":false,"output_compression":false,"partial_images":{"const":0},"stream":{"const":false}}}}],"properties":{"aspect_ratio":false,"background":{"enum":["opaque","auto","transparent"]},"frame_count":{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"},"image":{"maxItems":14},"input_fidelity":false,"mask":false,"n":{"const":1},"negativePrompt":false,"negative_prompt":false,"output_compression":false,"output_format":{"enum":["png","gif"],"type":"string"},"prompt":{"minLength":1,"type":"string"},"quality":{"enum":["auto","low","medium","high"],"type":"string"},"resolution":false,"response_format":{"enum":["url","b64_json"]},"size":{"pattern":"^[1-9][0-9]*x[1-9][0-9]*$","type":"string"}},"type":"object","x-image-size-aspect-ratio":"consume_if_declared_or_quantized","x-image-size-aspect-ratios":{"1024x1024":"1:1","1024x3072":"1:3","1024x768":"4:3","1120x896":"5:4","1152x2048":"9:16","1152x2688":"9:21","1152x768":"3:2","1280x3840":"1:3","1280x720":"16:9","1344x576":"21:9","1408x2816":"1:2","1408x704":"2:1","1536x2048":"3:4","1536x2304":"2:3","1536x512":"3:1","1648x3840":"9:21","1792x2240":"4:5","1920x3840":"1:2","2048x1152":"16:9","2048x1536":"4:3","2048x2048":"1:1","2160x3840":"9:16","2240x1792":"5:4","2304x1536":"3:2","2352x3520":"2:3","2480x3312":"3:4","2560x3200":"4:5","2688x1152":"21:9","2816x1408":"2:1","2880x2880":"1:1","3072x1024":"3:1","3200x2560":"5:4","3312x2480":"4:3","3520x2352":"3:2","3840x1280":"3:1","3840x1648":"21:9","3840x1920":"2:1","3840x2160":"16:9","512x1536":"1:3","576x1344":"9:21","704x1408":"1:2","720x1280":"9:16","768x1024":"3:4","768x1152":"2:3","896x1120":"4:5"},"x-image-size-limits":{"allow_auto":false,"allow_custom":true,"allow_ratio":false,"max_aspect_ratio":[3,1],"max_edge":3840,"max_pixels":8294400,"min_aspect_ratio":[1,3],"min_pixels":655360,"multiple_of":16}}],"description":"Each route is prepared independently from the original request. When the Key enables cross-source failover, eligible quality and input_fidelity preferences may be adjusted even on the preferred route if that route rejects them. Other parameters, including size and resolution, are not adjusted by this preference policy. Fallback candidates that exceed the Key's price limit are not dispatched.","properties":{"aspect_ratio":false,"background":{"enum":["opaque","auto","transparent"]},"frame_count":{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"},"image":{"maxItems":14},"image[]":{"x-relay-source":"protocol"},"images":{"x-relay-source":"protocol"},"input_fidelity":false,"mask":false,"model":{"type":["string","null"],"x-relay-source":"protocol"},"n":{"const":1,"type":["integer","null"],"x-relay-source":"protocol"},"negativePrompt":false,"negative_prompt":false,"output_compression":false,"output_format":{"enum":["png","gif"],"type":"string"},"partial_images":{"type":["integer","null"],"x-relay-source":"protocol"},"prompt":{"minLength":1,"type":"string"},"quality":{"description":"Omitting quality is different from explicitly sending auto. The enum or const describes values accepted without preference adjustment. Recognized quality values eligible for adjustment are auto, low, medium, high, standard, hd, xhigh and max. When omitted, the upstream default applies unless another declared mapping supplies a value. When cross-source failover is enabled, a recognized unsupported value may be omitted; the candidate is then validated again and its default applies.","enum":["auto","low","medium","high"],"type":"string"},"resolution":false,"response_format":{"enum":["url","b64_json"]},"size":{"default":"1024x1024","enum":["1024x1024","1024x768","1120x896","1152x768","1280x720","1344x576","1408x704","1536x512","512x1536","576x1344","704x1408","720x1280","768x1024","768x1152","896x1120","2048x2048","1024x3072","1152x2048","1152x2688","1408x2816","1536x2048","1536x2304","1792x2240","2048x1152","2048x1536","2240x1792","2304x1536","2688x1152","2816x1408","3072x1024","2880x2880","1280x3840","1648x3840","1920x3840","2160x3840","2352x3520","2480x3312","2560x3200","3200x2560","3312x2480","3520x2352","3840x1280","3840x1648","3840x1920","3840x2160"],"pattern":"^[1-9][0-9]*x[1-9][0-9]*$","type":"string","x-image-size-limits":{"allow_auto":false,"allow_custom":true,"allow_ratio":false,"max_aspect_ratio":[3,1],"max_edge":3840,"max_pixels":8294400,"min_aspect_ratio":[1,3],"min_pixels":655360,"multiple_of":16},"x-relay-source":"offer"},"stream":{"type":["boolean","null"],"x-relay-source":"protocol"},"user":{"type":["string","null"],"x-relay-source":"protocol"}},"type":"object"},"request_example":{"background":"opaque","image[]":"@./input.png","model":"gpt-image-2.6-sunburst","n":1,"output_format":"png","prompt":"Improve the lighting.","quality":"auto","response_format":"url","size":"1024x1024"}}}, + {"id":"9f6a7163-2114-4476-9482-52667ec57817","available":true,"is_default":false,"pricing":{"charge_mode":"tariff","billing_mode":"per_request","currency":"CNY","unit":"request","effective_price":0.35},"invocation":{"method":"POST","path":"/v1/images/edits","content_type":"multipart/form-data","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"9f6a7163-2114-4476-9482-52667ec57817"},"input_schema":{"additionalProperties":true,"allOf":[{"properties":{"file_urls":{"type":"array"},"input_fidelity":false,"n":{"const":1,"type":"integer"},"output_format":{"description":"Animated GIF. Set output_format to gif explicitly.","enum":["gif"],"type":"string"},"response_format":{"enum":["url"],"type":"string"},"size":{"description":"Canvas size or documented source preset.","enum":["1024x1024","2048x2048","2880x2880","1280x720","2048x1152","3840x2160","720x1280","1152x2048","2160x3840","1152x864","2304x1728","3264x2448","864x1152","1728x2304","2448x3264","1536x1024","2048x1360","3504x2336","1024x1536","1360x2048","2336x3504","1120x896","2240x1792","3200x2560","896x1120","1792x2240","2560x3200","1456x624","2912x1248","3840x1648","624x1456","1248x2912","1648x3840","688x2048","1280x3840","2048x688","3840x1280","1536x768","3072x1536","3840x1920","768x1536","1536x3072","1920x3840","auto"],"type":"string"}},"required":["output_format"],"type":"object","x-failover-parameter-defaults":{},"x-image-size-aspect-ratio":"consume_if_declared","x-image-size-aspect-ratios":{"1024x1024":"1:1","1024x1536":"2:3","1120x896":"5:4","1152x2048":"9:16","1152x864":"4:3","1248x2912":"9:21","1280x3840":"1:3","1280x720":"16:9","1360x2048":"2:3","1456x624":"21:9","1536x1024":"3:2","1536x3072":"1:2","1536x768":"2:1","1648x3840":"9:21","1728x2304":"3:4","1792x2240":"4:5","1920x3840":"1:2","2048x1152":"16:9","2048x1360":"3:2","2048x2048":"1:1","2048x688":"3:1","2160x3840":"9:16","2240x1792":"5:4","2304x1728":"4:3","2336x3504":"2:3","2448x3264":"3:4","2560x3200":"4:5","2880x2880":"1:1","2912x1248":"21:9","3072x1536":"2:1","3200x2560":"5:4","3264x2448":"4:3","3504x2336":"3:2","3840x1280":"3:1","3840x1648":"21:9","3840x1920":"2:1","3840x2160":"16:9","624x1456":"9:21","688x2048":"1:3","720x1280":"9:16","768x1536":"1:2","864x1152":"3:4","896x1120":"4:5"}}],"description":"Each route is prepared independently from the original request. When the Key enables cross-source failover, eligible quality and input_fidelity preferences may be adjusted even on the preferred route if that route rejects them. Other parameters, including size and resolution, are not adjusted by this preference policy. Fallback candidates that exceed the Key's price limit are not dispatched.","properties":{"background":{"enum":["transparent"],"type":"string","x-relay-source":"offer"},"file_urls":{"type":"array"},"image":{"x-relay-source":"protocol"},"image[]":{"x-relay-source":"protocol"},"images":{"x-relay-source":"protocol"},"input_fidelity":false,"mask":false,"model":{"type":["string","null"],"x-relay-source":"protocol"},"n":{"allOf":[{"allOf":[{"type":["integer","null"],"x-relay-source":"protocol"},{"const":1,"type":"integer"}],"const":1,"type":"integer"},{"const":1}]},"output_compression":false,"output_format":{"description":"Animated GIF. Set output_format to gif explicitly.","enum":["gif"],"type":"string"},"partial_images":false,"prompt":{"x-relay-source":"protocol"},"quality":{"description":"Omitting quality is different from explicitly sending auto. The enum or const describes values accepted without preference adjustment. Recognized quality values eligible for adjustment are auto, low, medium, high, standard, hd, xhigh and max. When omitted, the upstream default applies unless another declared mapping supplies a value. This route does not allow preference adjustment for this field.","enum":["auto","low","medium","high"],"type":"string","x-relay-source":"offer"},"response_format":{"enum":["url"],"type":"string"},"size":{"description":"Canvas size or documented source preset.","enum":["1024x1024","2048x2048","2880x2880","1280x720","2048x1152","3840x2160","720x1280","1152x2048","2160x3840","1152x864","2304x1728","3264x2448","864x1152","1728x2304","2448x3264","1536x1024","2048x1360","3504x2336","1024x1536","1360x2048","2336x3504","1120x896","2240x1792","3200x2560","896x1120","1792x2240","2560x3200","1456x624","2912x1248","3840x1648","624x1456","1248x2912","1648x3840","688x2048","1280x3840","2048x688","3840x1280","1536x768","3072x1536","3840x1920","768x1536","1536x3072","1920x3840","auto"],"type":"string","x-relay-source":"offer"},"stream":{"enum":[false,null],"type":["boolean","null"],"x-relay-source":"protocol"},"user":false},"type":"object","x-relay-image-edit-json":true},"request_example":{"background":"transparent","image[]":"@./input.png","model":"gpt-image-2.6-sunburst","output_format":"gif","prompt":"Improve the lighting.","quality":"auto","response_format":"url","size":"1024x1024","stream":false}}}, + {"id":"03ae6e65-a3fe-43c1-b60f-c60031be559e","available":true,"is_default":false,"pricing":{"charge_mode":"tariff","billing_mode":"per_request","currency":"CNY","unit":"request","effective_price":0.18,"video_price_tiers":[{"tokens_per_second":"0","resolution":"1K","unit":"request","price":0.18},{"tokens_per_second":"0","resolution":"2K","unit":"request","price":0.24},{"tokens_per_second":"0","resolution":"4K","unit":"request","price":0.3}],"dynamic":true},"invocation":{"method":"POST","path":"/v1/images/edits","content_type":"multipart/form-data","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"03ae6e65-a3fe-43c1-b60f-c60031be559e"},"input_schema":{"additionalProperties":true,"allOf":[{"allOf":[{"if":{"required":["file_urls","frame_count"]},"then":{"properties":{"frame_count":{"const":9}}}},{"if":{"required":["image","frame_count"]},"then":{"properties":{"frame_count":{"const":9}}}},{"if":{"required":["images","frame_count"]},"then":{"properties":{"frame_count":{"const":9}}}},{"if":{"allOf":[{"anyOf":[{"required":["images"]},{"required":["image"]},{"required":["image[]"]}]}],"required":["frame_count"]},"then":{"properties":{"frame_count":{"const":9}}}},{"else":{"not":{"anyOf":[{"required":["frame_count"]},{"required":["frame_duration_ms"]}]}},"if":{"properties":{"output_format":{"const":"gif"}},"required":["output_format"]}},{"properties":{"images":{"maxItems":10,"type":"array"}}},{"properties":{"image":{"maxItems":10,"type":"array"}}},{"properties":{"image[]":{"maxItems":10,"type":"array"}}}],"properties":{"aspect_ratio":{"enum":["1:1","3:2","2:3","4:3","3:4","5:4","4:5","16:9","9:16","21:9"],"type":"string"},"file_urls":{"maxItems":10,"type":"array"},"frame_count":{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer"},"image":{"maxItems":10,"type":"array"},"images":{"maxItems":10,"type":"array"},"input_fidelity":false,"n":{"const":1,"type":"integer"},"output_format":{"description":"png, jpeg, webp, or gif. PNG by default.","enum":["png","jpeg","webp","gif"],"type":"string"},"resolution":{"enum":["1K","2K","4K"],"type":"string"},"response_format":{"enum":["url"],"type":"string"},"size":{"description":"Canvas size or documented source preset.","enum":["1024x1024"],"type":"string"}},"type":"object","x-failover-parameter-defaults":{}}],"description":"Each route is prepared independently from the original request. When the Key enables cross-source failover, eligible quality and input_fidelity preferences may be adjusted even on the preferred route if that route rejects them. Other parameters, including size and resolution, are not adjusted by this preference policy. Fallback candidates that exceed the Key's price limit are not dispatched.","properties":{"aspect_ratio":{"enum":["1:1","3:2","2:3","4:3","3:4","5:4","4:5","16:9","9:16","21:9"],"type":"string"},"background":{"enum":["transparent"],"type":"string","x-relay-source":"offer"},"file_urls":{"maxItems":10,"type":"array"},"frame_count":{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer","x-relay-source":"offer"},"frame_duration_ms":{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer","x-relay-source":"offer"},"image":{"maxItems":10,"type":"array"},"image[]":{"maxItems":10,"type":"array","x-relay-source":"protocol"},"images":{"maxItems":10,"type":"array"},"input_fidelity":false,"mask":false,"model":{"type":["string","null"],"x-relay-source":"protocol"},"n":{"allOf":[{"type":["integer","null"],"x-relay-source":"protocol"},{"const":1,"type":"integer"}],"const":1,"type":"integer","x-relay-source":"offer"},"output_compression":false,"output_format":{"default":"png","description":"png, jpeg, webp, or gif. PNG by default.","enum":["png","jpeg","webp","gif"],"type":"string","x-relay-source":"offer"},"partial_images":false,"prompt":{"x-relay-source":"protocol"},"quality":{"const":"high","default":"high","description":"This source renders at high quality. Omitting quality is different from explicitly sending auto. The enum or const describes values accepted without preference adjustment. Recognized quality values eligible for adjustment are auto, low, medium, high, standard, hd, xhigh and max. When omitted, the configured route value \"high\" is applied. This route does not allow preference adjustment for this field.","type":"string","x-relay-source":"offer"},"resolution":{"default":"1K","enum":["1K","2K","4K"],"type":"string","x-relay-source":"offer"},"response_format":{"enum":["url"],"type":"string"},"size":{"description":"Canvas size or documented source preset.","enum":["1024x1024"],"type":"string","x-relay-source":"offer"},"stream":{"enum":[false,null],"type":["boolean","null"],"x-relay-source":"protocol"},"user":false},"type":"object","x-relay-image-edit-json":true},"request_example":{"aspect_ratio":"1:1","background":"transparent","image[]":"@./input.png","model":"gpt-image-2.6-sunburst","n":1,"output_format":"png","prompt":"Improve the lighting.","quality":"high","response_format":"url","size":"1024x1024","stream":false}}} + ] + }, + { + "available": true, + "service_scope": { + "id": "scope-647ef17f8e2c4afd9ea3d4e97c3beb38" + }, + "route_options": [ + {"id":"780daa3a-b8a0-449c-af28-d3cc95d356b8","available":true,"is_default":true,"pricing":{"charge_mode":"tariff","billing_mode":"per_request","currency":"CNY","unit":"request","effective_price":0.1},"invocation":{"method":"POST","path":"/extensions/v1/tasks","content_type":"application/json","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"780daa3a-b8a0-449c-af28-d3cc95d356b8"},"input_schema":{"additionalProperties":false,"allOf":[{"allOf":[{"anyOf":[{"properties":{"file_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^https?[:][/][/]","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^https?[:][/][/]","properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^https?[:][/][/]","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^https?[:][/][/]","properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^https?[:][/][/]","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^https?[:][/][/]","properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"images":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^https?[:][/][/]","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^https?[:][/][/]","properties":{"image_url":{"pattern":"^https?[:][/][/]","type":"string"}},"required":["image_url"],"type":["string","array","object"]}}},{"properties":{"file_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^data:image/[^;,]+;base64,","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^data:image/[^;,]+;base64,","properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^data:image/[^;,]+;base64,","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^data:image/[^;,]+;base64,","properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^data:image/[^;,]+;base64,","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^data:image/[^;,]+;base64,","properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"images":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^data:image/[^;,]+;base64,","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^data:image/[^;,]+;base64,","properties":{"image_url":{"pattern":"^data:image/[^;,]+;base64,","type":"string"}},"required":["image_url"],"type":["string","array","object"]}}},{"properties":{"file_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^file$","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^file$","properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^file$","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^file$","properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"image_urls":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^file$","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^file$","properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":["string","array","object"]},"images":{"additionalProperties":false,"items":{"anyOf":[{"pattern":"^file$","type":"string"},{"additionalProperties":false,"properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":"object"}]},"maxItems":14,"pattern":"^file$","properties":{"image_url":{"pattern":"^file$","type":"string"}},"required":["image_url"],"type":["string","array","object"]}}}]},{"if":{"properties":{"size":{"enum":["1536x512","1344x576","1280x720","1152x768","1024x768","1024x1024","768x1024","768x1152","720x1280","512x1536","1120x896","896x1120","1408x704","704x1408","576x1344"]}},"required":["size"]},"then":{"properties":{"resolution":{"const":"1K"}}}},{"if":{"properties":{"size":{"enum":["3072x1024","2688x1152","2048x1152","2304x1536","2048x1536","2048x2048","1536x2048","1536x2304","1152x2048","1024x3072","2240x1792","1792x2240","2816x1408","1408x2816","1152x2688"]}},"required":["size"]},"then":{"properties":{"resolution":{"const":"2K"}}}},{"if":{"properties":{"size":{"enum":["3840x1280","3840x1648","3840x2160","3520x2352","3312x2480","2880x2880","2480x3312","2352x3520","2160x3840","1280x3840","3200x2560","2560x3200","3840x1920","1920x3840","1648x3840"]}},"required":["size"]},"then":{"properties":{"resolution":{"const":"4K"}}}},{"if":{"anyOf":[{"allOf":[{"anyOf":[{"required":["frame_count"]},{"properties":{"metadata":{"required":["frame_count"]}},"required":["metadata"]}]}],"required":[]},{"allOf":[{"anyOf":[{"required":["frame_duration_ms"]},{"properties":{"metadata":{"required":["frame_duration_ms"]}},"required":["metadata"]}]}],"required":[]}]},"then":{"properties":{"output_format":{"const":"gif"}},"required":["output_format"]}},{"if":{"properties":{"output_format":{"const":"gif"}},"required":["output_format"]},"then":{"properties":{"mask":false,"output_compression":false,"partial_images":{"const":0},"stream":{"const":false}}}}],"properties":{"aspect_ratio":{"enum":["16:9","1:1","1:2","1:3","21:9","2:1","2:3","3:1","3:2","3:4","4:3","4:5","5:4","9:16","9:21"],"type":"string"},"file_urls":{"maxItems":14,"type":"array"},"files":{"maxItems":0},"frame_count":{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"},"image":{"maxItems":14},"image_units":{"maximum":1},"input_fidelity":false,"mask":false,"metadata":{"properties":{"frame_count":{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"}}},"n":{"const":1},"negativePrompt":false,"negative_prompt":false,"output_compression":false,"output_format":{"enum":["png","gif"],"type":"string"},"prompt":{"minLength":1,"type":"string"},"resolution":{"enum":["1K","2K","4K"]},"response_format":{"enum":["url","b64_json"]},"size":{"pattern":"^[1-9][0-9]*x[1-9][0-9]*$","type":"string"}},"type":"object","x-image-size-aspect-ratio":"consume_if_declared_or_quantized","x-image-size-aspect-ratios":{"1024x1024":"1:1","1024x3072":"1:3","1024x768":"4:3","1120x896":"5:4","1152x2048":"9:16","1152x2688":"9:21","1152x768":"3:2","1280x3840":"1:3","1280x720":"16:9","1344x576":"21:9","1408x2816":"1:2","1408x704":"2:1","1536x2048":"3:4","1536x2304":"2:3","1536x512":"3:1","1648x3840":"9:21","1792x2240":"4:5","1920x3840":"1:2","2048x1152":"16:9","2048x1536":"4:3","2048x2048":"1:1","2160x3840":"9:16","2240x1792":"5:4","2304x1536":"3:2","2352x3520":"2:3","2480x3312":"3:4","2560x3200":"4:5","2688x1152":"21:9","2816x1408":"2:1","2880x2880":"1:1","3072x1024":"3:1","3200x2560":"5:4","3312x2480":"4:3","3520x2352":"3:2","3840x1280":"3:1","3840x1648":"21:9","3840x1920":"2:1","3840x2160":"16:9","512x1536":"1:3","576x1344":"9:21","704x1408":"1:2","720x1280":"9:16","768x1024":"3:4","768x1152":"2:3","896x1120":"4:5"},"x-image-size-limits":{"allow_auto":false,"allow_custom":true,"allow_ratio":false,"max_aspect_ratio":[3,1],"max_edge":3840,"max_pixels":8294400,"min_aspect_ratio":[1,3],"min_pixels":655360,"multiple_of":16}}],"anyOf":[{"additionalProperties":false,"anyOf":[{"properties":{"prompt":{"minLength":1}},"required":["prompt"]},{"properties":{"file_urls":{"minItems":1}},"required":["file_urls"]}],"properties":{"background":{"enum":["opaque","auto","transparent"],"type":"string"},"file_urls":{"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},"frame_count":{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"},"model":{"type":"string"},"output_format":{"type":"string"},"prompt":{"maxLength":50000,"type":"string"},"quality":{"enum":["auto","low","medium","high"],"type":"string"},"resolution":{"default":"1K","enum":["1K","2K","4K"],"type":"string"},"response_format":{"enum":["url","b64_json"],"type":"string"},"size":{"default":"auto","pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"}},"required":["model"],"type":"object"},{"additionalProperties":false,"anyOf":[{"properties":{"prompt":{"minLength":1}},"required":["prompt"]},{"properties":{"file_urls":{"minItems":1}},"required":["file_urls"]}],"properties":{"file_urls":{"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},"metadata":{"additionalProperties":false,"properties":{"background":{"enum":["opaque","auto","transparent"],"type":"string"},"frame_count":{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"},"quality":{"enum":["auto","low","medium","high"],"type":"string"}},"type":"object"},"model":{"type":"string"},"output_format":{"type":"string"},"prompt":{"maxLength":50000,"type":"string"},"resolution":{"default":"1K","enum":["1K","2K","4K"],"type":"string"},"response_format":{"enum":["url","b64_json"],"type":"string"},"size":{"default":"auto","pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"}},"required":["model"],"type":"object"},{"additionalProperties":false,"allOf":[{"not":{"properties":{"metadata":{"required":["background"]}},"required":["background","metadata"]}},{"not":{"properties":{"metadata":{"required":["frame_count"]}},"required":["frame_count","metadata"]}},{"not":{"properties":{"metadata":{"required":["frame_duration_ms"]}},"required":["frame_duration_ms","metadata"]}},{"not":{"properties":{"metadata":{"required":["quality"]}},"required":["quality","metadata"]}}],"anyOf":[{"properties":{"prompt":{"minLength":1}},"required":["prompt"]},{"properties":{"file_urls":{"minItems":1}},"required":["file_urls"]}],"properties":{"background":{"enum":["opaque","auto","transparent"],"type":"string"},"file_urls":{"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},"frame_count":{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"},"metadata":{"additionalProperties":false,"properties":{"background":{"enum":["opaque","auto","transparent"],"type":"string"},"frame_count":{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"},"quality":{"enum":["auto","low","medium","high"],"type":"string"}},"type":"object"},"model":{"type":"string"},"output_format":{"type":"string"},"prompt":{"maxLength":50000,"type":"string"},"quality":{"enum":["auto","low","medium","high"],"type":"string"},"resolution":{"default":"1K","enum":["1K","2K","4K"],"type":"string"},"response_format":{"enum":["url","b64_json"],"type":"string"},"size":{"default":"auto","pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"}},"required":["model"],"type":"object"}],"properties":{"background":{"enum":["opaque","auto","transparent"],"type":"string"},"file_urls":{"allOf":[{"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},{"maxItems":14,"type":"array"}],"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":14,"type":"array"},"frame_count":{"allOf":[{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"}],"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"allOf":[{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"},{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"}],"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"},"metadata":{"additionalProperties":false,"properties":{"background":{"enum":["opaque","auto","transparent"],"type":"string"},"frame_count":{"description":"Optional GIF frame count. The upstream uses 9 when omitted on GIF requests.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"Optional GIF frame delay in milliseconds. The upstream uses 200 when omitted on GIF requests.","maximum":2000,"minimum":20,"type":"integer"},"quality":{"enum":["auto","low","medium","high"],"type":"string"}},"type":"object"},"model":{"type":"string"},"output_format":{"allOf":[{"type":"string"},{"enum":["png","gif"],"type":"string"}],"enum":["png","gif"],"type":"string"},"prompt":{"allOf":[{"maxLength":50000,"type":"string"},{"minLength":1,"type":"string"}],"maxLength":50000,"minLength":1,"type":"string"},"quality":{"enum":["auto","low","medium","high"],"type":"string"},"resolution":{"allOf":[{"default":"1K","enum":["1K","2K","4K"],"type":"string"},{"enum":["1K","2K","4K"]}],"default":"1K","enum":["1K","2K","4K"],"type":"string"},"response_format":{"allOf":[{"enum":["url","b64_json"],"type":"string"},{"enum":["url","b64_json"]}],"enum":["url","b64_json"],"type":"string"},"size":{"allOf":[{"default":"auto","pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"},{"pattern":"^[1-9][0-9]*x[1-9][0-9]*$","type":"string"}],"default":"auto","pattern":"^[1-9][0-9]*x[1-9][0-9]*$","type":"string"}},"required":["model"],"type":"object"},"request_example":{"metadata":{"background":"opaque","quality":"auto"},"model":"gpt-image-2.6-sunburst","output_format":"png","prompt":"A clean product scene.","resolution":"1K","response_format":"url"},"result_method":"GET","result_path":"/extensions/v1/tasks/{task_id}/result"}}, + {"id":"3d970631-a108-43be-915f-1e8cab6fb8eb","available":true,"is_default":false,"pricing":{"charge_mode":"tariff","billing_mode":"per_request","currency":"CNY","unit":"request","effective_price":0.18,"video_price_tiers":[{"tokens_per_second":"0","resolution":"1K","unit":"request","price":0.18},{"tokens_per_second":"0","resolution":"2K","unit":"request","price":0.24},{"tokens_per_second":"0","resolution":"4K","unit":"request","price":0.3}],"dynamic":true},"invocation":{"method":"POST","path":"/extensions/v1/tasks","content_type":"application/json","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"3d970631-a108-43be-915f-1e8cab6fb8eb"},"input_schema":{"additionalProperties":false,"allOf":[{"allOf":[{"if":{"allOf":[{"anyOf":[{"required":["frame_count"]},{"properties":{"metadata":{"required":["frame_count"]}},"required":["metadata"]}]}],"required":["file_urls"]},"then":{"properties":{"frame_count":{"const":9},"metadata":{"properties":{"frame_count":{"const":9}}}}}},{"if":{"allOf":[{"anyOf":[{"required":["frame_count"]},{"properties":{"metadata":{"required":["frame_count"]}},"required":["metadata"]}]}],"required":["image"]},"then":{"properties":{"frame_count":{"const":9},"metadata":{"properties":{"frame_count":{"const":9}}}}}},{"if":{"allOf":[{"anyOf":[{"required":["frame_count"]},{"properties":{"metadata":{"required":["frame_count"]}},"required":["metadata"]}]}],"required":["images"]},"then":{"properties":{"frame_count":{"const":9},"metadata":{"properties":{"frame_count":{"const":9}}}}}},{"if":{"allOf":[{"anyOf":[{"required":["frame_count"]},{"properties":{"metadata":{"required":["frame_count"]}},"required":["metadata"]}]}],"required":["files"]},"then":{"properties":{"frame_count":{"const":9},"metadata":{"properties":{"frame_count":{"const":9}}}}}},{"else":{"not":{"anyOf":[{"allOf":[{"anyOf":[{"required":["frame_count"]},{"properties":{"metadata":{"required":["frame_count"]}},"required":["metadata"]}]}],"required":[]},{"allOf":[{"anyOf":[{"required":["frame_duration_ms"]},{"properties":{"metadata":{"required":["frame_duration_ms"]}},"required":["metadata"]}]}],"required":[]}]}},"if":{"properties":{"output_format":{"const":"gif"}},"required":["output_format"]}}],"properties":{"aspect_ratio":{"enum":["1:1","3:2","2:3","4:3","3:4","5:4","4:5","16:9","9:16","21:9"],"type":"string"},"file_urls":{"maxItems":10,"type":"array"},"files":{"maxItems":10,"type":"array"},"frame_count":{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer"},"image":{"maxItems":10,"type":"array"},"image_units":{"const":1,"type":"integer"},"images":{"maxItems":10,"type":"array"},"input_fidelity":false,"metadata":{"properties":{"frame_count":{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer"}}},"n":{"const":1,"type":"integer"},"output_format":{"description":"png, jpeg, webp, or gif. PNG by default.","enum":["png","jpeg","webp","gif"],"type":"string"},"resolution":{"enum":["1K","2K","4K"],"type":"string"},"response_format":{"enum":["url"],"type":"string"},"size":{"description":"Canvas size or documented source preset.","enum":["1024x1024"],"type":"string"}},"type":"object","x-failover-parameter-defaults":{}}],"anyOf":[{"additionalProperties":false,"anyOf":[{"properties":{"prompt":{"minLength":1}},"required":["prompt"]},{"properties":{"file_urls":{"minItems":1}},"required":["file_urls"]}],"properties":{"aspect_ratio":{"type":"string"},"background":{"enum":["transparent"],"type":"string"},"file_urls":{"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},"frame_count":{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer"},"image_units":{"const":1,"maximum":16,"minimum":1,"type":"integer"},"model":{"type":"string"},"output_format":{"default":"png","type":"string"},"prompt":{"maxLength":50000,"type":"string"},"quality":{"const":"high","default":"high","description":"This source renders at high quality.","type":"string"},"resolution":{"default":"1K","enum":["1K","2K","4K"],"type":"string"},"response_format":{"enum":["url","b64_json"],"type":"string"},"size":{"default":"auto","pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"}},"required":["model"],"type":"object"},{"additionalProperties":false,"anyOf":[{"properties":{"prompt":{"minLength":1}},"required":["prompt"]},{"properties":{"file_urls":{"minItems":1}},"required":["file_urls"]}],"properties":{"aspect_ratio":{"type":"string"},"file_urls":{"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},"image_units":{"const":1,"maximum":16,"minimum":1,"type":"integer"},"metadata":{"additionalProperties":false,"properties":{"background":{"enum":["transparent"],"type":"string"},"frame_count":{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer"},"quality":{"const":"high","default":"high","description":"This source renders at high quality.","type":"string"}},"type":"object"},"model":{"type":"string"},"output_format":{"default":"png","type":"string"},"prompt":{"maxLength":50000,"type":"string"},"resolution":{"default":"1K","enum":["1K","2K","4K"],"type":"string"},"response_format":{"enum":["url","b64_json"],"type":"string"},"size":{"default":"auto","pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"}},"required":["model"],"type":"object"},{"additionalProperties":false,"allOf":[{"not":{"properties":{"metadata":{"required":["background"]}},"required":["background","metadata"]}},{"not":{"properties":{"metadata":{"required":["frame_count"]}},"required":["frame_count","metadata"]}},{"not":{"properties":{"metadata":{"required":["frame_duration_ms"]}},"required":["frame_duration_ms","metadata"]}},{"not":{"properties":{"metadata":{"required":["quality"]}},"required":["quality","metadata"]}}],"anyOf":[{"properties":{"prompt":{"minLength":1}},"required":["prompt"]},{"properties":{"file_urls":{"minItems":1}},"required":["file_urls"]}],"properties":{"aspect_ratio":{"type":"string"},"background":{"enum":["transparent"],"type":"string"},"file_urls":{"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},"frame_count":{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer"},"image_units":{"const":1,"maximum":16,"minimum":1,"type":"integer"},"metadata":{"additionalProperties":false,"properties":{"background":{"enum":["transparent"],"type":"string"},"frame_count":{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer"},"quality":{"const":"high","default":"high","description":"This source renders at high quality.","type":"string"}},"type":"object"},"model":{"type":"string"},"output_format":{"default":"png","type":"string"},"prompt":{"maxLength":50000,"type":"string"},"quality":{"const":"high","default":"high","description":"This source renders at high quality.","type":"string"},"resolution":{"default":"1K","enum":["1K","2K","4K"],"type":"string"},"response_format":{"enum":["url","b64_json"],"type":"string"},"size":{"default":"auto","pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"}},"required":["model"],"type":"object"}],"properties":{"aspect_ratio":{"allOf":[{"type":"string"},{"enum":["1:1","3:2","2:3","4:3","3:4","5:4","4:5","16:9","9:16","21:9"],"type":"string"}],"enum":["1:1","3:2","2:3","4:3","3:4","5:4","4:5","16:9","9:16","21:9"],"type":"string"},"background":{"enum":["transparent"],"type":"string"},"file_urls":{"allOf":[{"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},{"maxItems":10,"type":"array"}],"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":10,"type":"array"},"frame_count":{"allOf":[{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer"},{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer"}],"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"allOf":[{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer"},{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer"}],"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer"},"image_units":{"allOf":[{"const":1,"maximum":16,"minimum":1,"type":"integer"},{"const":1,"type":"integer"}],"const":1,"maximum":16,"minimum":1,"type":"integer"},"metadata":{"additionalProperties":false,"properties":{"background":{"enum":["transparent"],"type":"string"},"frame_count":{"description":"GIF without reference images. Defaults to 9 frames.","maximum":16,"minimum":2,"type":"integer"},"frame_duration_ms":{"description":"GIF frame duration in milliseconds. Defaults to 200.","maximum":2000,"minimum":20,"multipleOf":10,"type":"integer"},"quality":{"const":"high","default":"high","description":"This source renders at high quality.","type":"string"}},"type":"object"},"model":{"type":"string"},"output_format":{"allOf":[{"default":"png","type":"string"},{"description":"png, jpeg, webp, or gif. PNG by default.","enum":["png","jpeg","webp","gif"],"type":"string"}],"default":"png","description":"png, jpeg, webp, or gif. PNG by default.","enum":["png","jpeg","webp","gif"],"type":"string"},"prompt":{"maxLength":50000,"type":"string"},"quality":{"const":"high","default":"high","description":"This source renders at high quality.","type":"string"},"resolution":{"allOf":[{"default":"1K","enum":["1K","2K","4K"],"type":"string"},{"enum":["1K","2K","4K"],"type":"string"}],"default":"1K","enum":["1K","2K","4K"],"type":"string"},"response_format":{"allOf":[{"enum":["url","b64_json"],"type":"string"},{"enum":["url"],"type":"string"}],"enum":["url"],"type":"string"},"size":{"allOf":[{"default":"auto","pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"},{"description":"Canvas size or documented source preset.","enum":["1024x1024"],"type":"string"}],"default":"auto","description":"Canvas size or documented source preset.","enum":["1024x1024"],"pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"}},"required":["model"],"type":"object"},"request_example":{"aspect_ratio":"1:1","metadata":{"background":"transparent","quality":"high"},"model":"gpt-image-2.6-sunburst","output_format":"png","prompt":"A clean product scene.","resolution":"1K","response_format":"url","size":"1024x1024"},"result_method":"GET","result_path":"/extensions/v1/tasks/{task_id}/result"}}, + {"id":"f484cfb3-2b9d-4c89-a2ee-367f9fa772e0","available":true,"is_default":false,"pricing":{"charge_mode":"tariff","billing_mode":"per_request","currency":"CNY","unit":"request","effective_price":0.35},"invocation":{"method":"POST","path":"/extensions/v1/tasks","content_type":"application/json","authentication":{"type":"bearer","header":"Authorization","scheme":"Bearer","placeholder":"sk-your-api-key"},"headers":{"X-Relay-Route-Option":"f484cfb3-2b9d-4c89-a2ee-367f9fa772e0"},"input_schema":{"additionalProperties":false,"allOf":[{"properties":{"file_urls":{"type":"array"},"image_units":{"const":1,"type":"integer"},"input_fidelity":false,"n":{"const":1,"type":"integer"},"output_format":{"description":"Animated GIF. Set output_format to gif explicitly.","enum":["gif"],"type":"string"},"response_format":{"enum":["url"],"type":"string"},"size":{"description":"Canvas size or documented source preset.","enum":["1024x1024","2048x2048","2880x2880","1280x720","2048x1152","3840x2160","720x1280","1152x2048","2160x3840","1152x864","2304x1728","3264x2448","864x1152","1728x2304","2448x3264","1536x1024","2048x1360","3504x2336","1024x1536","1360x2048","2336x3504","1120x896","2240x1792","3200x2560","896x1120","1792x2240","2560x3200","1456x624","2912x1248","3840x1648","624x1456","1248x2912","1648x3840","688x2048","1280x3840","2048x688","3840x1280","1536x768","3072x1536","3840x1920","768x1536","1536x3072","1920x3840","auto"],"type":"string"}},"required":["output_format"],"type":"object","x-failover-parameter-defaults":{},"x-image-size-aspect-ratio":"consume_if_declared","x-image-size-aspect-ratios":{"1024x1024":"1:1","1024x1536":"2:3","1120x896":"5:4","1152x2048":"9:16","1152x864":"4:3","1248x2912":"9:21","1280x3840":"1:3","1280x720":"16:9","1360x2048":"2:3","1456x624":"21:9","1536x1024":"3:2","1536x3072":"1:2","1536x768":"2:1","1648x3840":"9:21","1728x2304":"3:4","1792x2240":"4:5","1920x3840":"1:2","2048x1152":"16:9","2048x1360":"3:2","2048x2048":"1:1","2048x688":"3:1","2160x3840":"9:16","2240x1792":"5:4","2304x1728":"4:3","2336x3504":"2:3","2448x3264":"3:4","2560x3200":"4:5","2880x2880":"1:1","2912x1248":"21:9","3072x1536":"2:1","3200x2560":"5:4","3264x2448":"4:3","3504x2336":"3:2","3840x1280":"3:1","3840x1648":"21:9","3840x1920":"2:1","3840x2160":"16:9","624x1456":"9:21","688x2048":"1:3","720x1280":"9:16","768x1536":"1:2","864x1152":"3:4","896x1120":"4:5"}}],"anyOf":[{"additionalProperties":false,"anyOf":[{"properties":{"prompt":{"minLength":1}},"required":["prompt"]},{"properties":{"file_urls":{"minItems":1}},"required":["file_urls"]}],"properties":{"background":{"enum":["transparent"],"type":"string"},"file_urls":{"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},"model":{"type":"string"},"output_format":{"type":"string"},"prompt":{"maxLength":50000,"type":"string"},"quality":{"enum":["auto","low","medium","high"],"type":"string"},"size":{"default":"auto","pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"}},"required":["model"],"type":"object"},{"additionalProperties":false,"anyOf":[{"properties":{"prompt":{"minLength":1}},"required":["prompt"]},{"properties":{"file_urls":{"minItems":1}},"required":["file_urls"]}],"properties":{"file_urls":{"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},"metadata":{"additionalProperties":false,"properties":{"background":{"enum":["transparent"],"type":"string"},"quality":{"enum":["auto","low","medium","high"],"type":"string"}},"type":"object"},"model":{"type":"string"},"output_format":{"type":"string"},"prompt":{"maxLength":50000,"type":"string"},"size":{"default":"auto","pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"}},"required":["model"],"type":"object"},{"additionalProperties":false,"allOf":[{"not":{"properties":{"metadata":{"required":["background"]}},"required":["background","metadata"]}},{"not":{"properties":{"metadata":{"required":["quality"]}},"required":["quality","metadata"]}}],"anyOf":[{"properties":{"prompt":{"minLength":1}},"required":["prompt"]},{"properties":{"file_urls":{"minItems":1}},"required":["file_urls"]}],"properties":{"background":{"enum":["transparent"],"type":"string"},"file_urls":{"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},"metadata":{"additionalProperties":false,"properties":{"background":{"enum":["transparent"],"type":"string"},"quality":{"enum":["auto","low","medium","high"],"type":"string"}},"type":"object"},"model":{"type":"string"},"output_format":{"type":"string"},"prompt":{"maxLength":50000,"type":"string"},"quality":{"enum":["auto","low","medium","high"],"type":"string"},"size":{"default":"auto","pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"}},"required":["model"],"type":"object"}],"properties":{"background":{"enum":["transparent"],"type":"string"},"file_urls":{"allOf":[{"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},{"type":"array"}],"items":{"format":"uri","pattern":"^([hH][tT][tT][pP][sS]?://|data:image/)","type":"string"},"maxItems":16,"type":"array"},"metadata":{"additionalProperties":false,"properties":{"background":{"enum":["transparent"],"type":"string"},"quality":{"enum":["auto","low","medium","high"],"type":"string"}},"type":"object"},"model":{"type":"string"},"output_format":{"allOf":[{"type":"string"},{"description":"Animated GIF. Set output_format to gif explicitly.","enum":["gif"],"type":"string"}],"description":"Animated GIF. Set output_format to gif explicitly.","enum":["gif"],"type":"string"},"prompt":{"maxLength":50000,"type":"string"},"quality":{"enum":["auto","low","medium","high"],"type":"string"},"size":{"allOf":[{"default":"auto","pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"},{"description":"Canvas size or documented source preset.","enum":["1024x1024","2048x2048","2880x2880","1280x720","2048x1152","3840x2160","720x1280","1152x2048","2160x3840","1152x864","2304x1728","3264x2448","864x1152","1728x2304","2448x3264","1536x1024","2048x1360","3504x2336","1024x1536","1360x2048","2336x3504","1120x896","2240x1792","3200x2560","896x1120","1792x2240","2560x3200","1456x624","2912x1248","3840x1648","624x1456","1248x2912","1648x3840","688x2048","1280x3840","2048x688","3840x1280","1536x768","3072x1536","3840x1920","768x1536","1536x3072","1920x3840","auto"],"type":"string"}],"default":"auto","description":"Canvas size or documented source preset.","enum":["1024x1024","2048x2048","2880x2880","1280x720","2048x1152","3840x2160","720x1280","1152x2048","2160x3840","1152x864","2304x1728","3264x2448","864x1152","1728x2304","2448x3264","1536x1024","2048x1360","3504x2336","1024x1536","1360x2048","2336x3504","1120x896","2240x1792","3200x2560","896x1120","1792x2240","2560x3200","1456x624","2912x1248","3840x1648","624x1456","1248x2912","1648x3840","688x2048","1280x3840","2048x688","3840x1280","1536x768","3072x1536","3840x1920","768x1536","1536x3072","1920x3840","auto"],"pattern":"^(auto|[1-9][0-9]*x[1-9][0-9]*)$","type":"string"}},"required":["model"],"type":"object"},"request_example":{"metadata":{"background":"transparent","quality":"auto"},"model":"gpt-image-2.6-sunburst","output_format":"gif","prompt":"A clean product scene.","size":"auto"},"result_method":"GET","result_path":"/extensions/v1/tasks/{task_id}/result"}} + ] + } + ] + } + ] + } + ] + } +}