← Zurück zur Liste

Multimodal – Bild- und Dokumentenverständnis

Vision-fähige Modelle akzeptieren Inhaltsteile vom Typ image_url: image_url

python
resp = client.chat.completions.create(
    model="gpt-4o",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "How many cats are in this image?"},
            {"type": "image_url", "image_url": {"url": "https://.../cats.png"}}
        ]
    }],
)

Bild-Token-Abrechnung

Jedes Bild wird grob abgerechnet 1,000 ~ 4,000 Token je nach Auflösung. Die Anzahl wird in die Antwort einbezogen usage.prompt_tokens.