Integration guides ยท 2026-09-22

Image input on Trendyol Asure 12B: why base64 data URI only

Covers why a remote image URL isn't accepted when sending an image to Trendyol Asure 12B, and how to correctly send the image as a base64 data URI instead.

Diagram showing an image file converted to a base64 string and attached to the request as a data URI instead of a remote URL.

The usual assumption doesn't hold here

Many vision-capable chat models offer a request the option of either a publicly reachable image URL or a base64-encoded image. Trendyol Asure 12B's model page departs from that general assumption: image input is accepted only as a base64-encoded data URI, and sending a remote image URL isn't supported.

If you move an integration built for a different model directly to this one and your code sends an image URL, the request likely returns an unexpected error; that doesn't mean the model doesn't support image input in general, just that it's about the format the image needs to arrive in.

How to convert an image into a data URI

A data URI is an image's raw bytes base64-encoded and combined with a prefix stating a MIME type for the image. In practice, this means writing a small helper function that reads the image file and base64-encodes it, then placing that string directly in the request's image field instead of a remote URL.

If the image comes from a local file, this conversion is direct. If the image already lives at a URL (a file a user uploaded that you keep in a storage service, for example), you need to download the image from that URL and convert it to base64 before sending the request; that adds an extra network call and a small delay to the request.

  • The image is accepted only as a base64 data URI; a remote URL isn't supported.
  • You need to download and convert an already-hosted image to base64 before sending it.
  • This conversion adds a small extra delay to the request; account for it with large images.

Consider request size on large images

Base64 encoding inflates the raw image size by roughly a third; if you're sending a high-resolution image, the request's total size can grow quickly. Sending a request with your typical image size before going to production and verifying the total payload stays reasonable prevents running into an unexpected size limit error.

Frequently asked questions

If I already have an image URL, can't I just send that directly?

No, this model doesn't accept a remote image URL. You need to download the image at that URL, convert it to a base64 data URI, and attach that string to the request instead.

Does the base64 conversion work the same way in every programming language?

The core logic (base64-encoding the raw bytes and adding a MIME type prefix) is the same, but the library or standard function used varies by language; using your language's standard base64 encoding tool is enough.

Related posts