imagesarrayobrigatório
List of input image URLs for editing. Up to 4 images.
alibaba/wan/2.7/image-to-imageAlibaba Wan 2.7 image-to-image model that edits images from a natural-language instruction, with multi-reference support and selectable aspect ratio.
Testar o modelo
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Selecione um exemplo para carregar as entradas e o resultado no playground.
{
"aspect_ratio": "9:16",
"images": [
"https://static.sandbase.ai/examples/0eeefa8f-0c4d-4a75-ad7e-6ead1df9e998/input/2a3945fe-b5cb-4a5c-bc95-e9b14b69d6ed.png"
],
"prompt": "Turn the scene into a snowy winter night"
}Preferência humana
Classificações Elo de votos cegos lado a lado, comparadas com outros modelos de imagem e vídeo.
Classificações obtidas de Artificial Analysis Arena
Arena de edição de imagem: as pessoas escolhem a melhor de duas edições da mesma imagem e instrução, sem ver os nomes dos modelos.
Edit or restyle pictures with an instruction. Send one or more images and describe the change; Wan 2.7 keeps what you do not mention.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 10,000 characters. |
images | image URL[], required | — | Images to edit or combine, referred to as Image 1, Image 2, … |
aspect_ratio | 21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16 / 9:21 | — | Omit to follow the first input image. |
$0.03 per output image, Alibaba's list price. Input images are not metered.
| Request | Price |
|---|---|
| One image | $0.03 |
Failed runs are not charged.
Other Wan 2.7 image endpoints: alibaba/wan/2.7/text-to-image, alibaba/wan/2.7/pro/text-to-image, alibaba/wan/2.7/pro/image-to-image.
Comece a construir
Envie este modelo pela SandBase Unified Run API.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "alibaba/wan/2.7/image-to-image",
"images": [
"https://static.sandbase.ai/samples/image-editing/edit-style-watercolor-source.png"
],
"prompt": "Convert this photograph into a delicate watercolor painting style with visible brush strokes and soft color bleeding"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Crie uma chave da API SandBase e defina-a no ambiente do seu servidor. Todas as requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha a chave no servidor. Não a exponha em código do navegador nem a comite em um repositório.
Faça POST para /v1/run com este ID de modelo e suas entradas. O exemplo de requisição acima inclui envio e polling.
Use o ID de execução retornado para fazer polling até que o status seja completed, failed ou timeout. Leia a saída somente após completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Passe uma URL de arquivo acessível publicamente no campo de imagem, vídeo ou áudio do modelo. Os formatos e limites suportados são mostrados ao lado de cada entrada do Playground.
Use o controle de upload ou substituição nos campos de imagem suportados no Playground. Campos de URL de vídeo aceitam um vídeo de condução hospedado; isso não implica suporte a upload de vídeo.
imagesarrayobrigatórioList of input image URLs for editing. Up to 4 images.
promptstringobrigatórioThe editing instruction describing what changes to make.
Padrão: "Convert this photograph into a delicate watercolor painting style with visible brush strokes and soft color bleeding"
aspect_ratiostringThe aspect ratio of the generated image.
Valores possíveis: "21:9", "16:9", "4:3", "1:1", "3:4", "9:16", "9:21"
{
"model": "alibaba/wan/2.7/image-to-image",
"images": [
"https://static.sandbase.ai/samples/image-editing/edit-style-watercolor-source.png"
],
"prompt": "Convert this photograph into a delicate watercolor painting style with visible brush strokes and soft color bleeding"
}Uma execução concluída expõe seu resultado em output. O texto a seguir é o exemplo salvo do modelo, não uma nova geração.
[
{
"source": "Self organization completed prediction",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/0eeefa8f-0c4d-4a75-ad7e-6ead1df9e998/output/fa02f813-dc4c-4b72-be4d-deaccae048ae.png"
}
]