Integration guides · 2026-10-17

Send images to the free Qwen3.8 27B: API guide

Send a base64 image to qwen/qwen3.8-27b-free through an OpenAI-compatible API: 131,042-token context, 16,384 output tokens, free with a daily quota.

Simple diagram: an image and a question go to https://llmtr.com/v1, the box reads Qwen3.8 27B with a free label, and a text answer returns to the application.

Short answer: send the image as an image_url part

LLMTR is a gateway that gives access to language models from different providers through one OpenAI-compatible API. You call the free Qwen3.8 27B there with the model id qwen/qwen3.8-27b-free on the /v1/chat/completions endpoint at https://llmtr.com/v1. You put the image into the message's content array as an image_url part, write your question next to it as a text part, and the answer comes back as text.

For this row the model card lists image input next to text input, as well as tool calling and JSON mode. The row is free with a daily usage quota: input and output both cost $0 per 1M tokens. The context window is 131,042 tokens, and a single response can carry at most 16,384 output tokens. Qwen describes Qwen3.8-27B as a native vision-language model that understands images and videos; on this LLMTR row image input is open and video input is not.

How do you send an image to the free Qwen3.8 27B?

Create an API key on LLMTR and keep it in the LLMTR_API_KEY environment variable. Set the OpenAI client's base_url to https://llmtr.com/v1 and pass qwen/qwen3.8-27b-free as the model. The Python example below reads a local receipt image, encodes it as base64 and sends it as a data URL with the data:image/png;base64, prefix. For a JPEG file, use the data:image/jpeg;base64, prefix instead.

This time the user message's content field is an array: one text part and one image_url part. The answer arrives in choices[0].message.content and the token counts in usage. The image is part of the prompt too, so it takes up room in the context window. If finish_reason is length, the answer was cut at the max_tokens limit; raise the limit (up to 16,384) or ask for a shorter answer.

The example also catches the 429 response that arrives when a free usage limit has been reached, and prints the Retry-After header. That way the script does not stop silently; it tells you how long to wait. If you use another OpenAI-compatible SDK or curl, the request body is the same: the user message in the messages array carries one text part and one image_url part, and the Authorization header carries your LLMTR key.

An OpenAI Python SDK example that sends a local image to qwen/qwen3.8-27b-free as a base64 data URL and prints the answer, the finish_reason check and the token usage.

import base64
import os

from openai import OpenAI, RateLimitError

client = OpenAI(base_url="https://llmtr.com/v1", api_key=os.environ["LLMTR_API_KEY"])

with open("receipt.png", "rb") as f:
    image_b64 = base64.b64encode(f.read()).decode("ascii")

try:
    response = client.chat.completions.create(
        model="qwen/qwen3.8-27b-free",
        messages=[
            {
                "role": "user",
                "content": [
                    {"type": "text", "text": "What is the total amount on this receipt? Answer in one line."},
                    {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_b64}"}},
                ],
            }
        ],
        max_tokens=512,
    )
except RateLimitError as err:
    print("Free usage limit reached, Retry-After:", err.response.headers.get("retry-after"))
    raise SystemExit(1)

choice = response.choices[0]
print(choice.message.content)
if choice.finish_reason == "length":
    print("The answer stopped at max_tokens.")
print(response.usage)

Which inputs are open on this row?

An image_url part is accepted. video_url and input_audio parts return 400 unsupported_input, because this row has no video or audio input, and the request never reaches the provider. A max_tokens above 16,384 gets 400 invalid_request, and the error message states the allowed ceiling.

There is no reasoning_effort on this row: if you send the field, the request returns 400 invalid_request. For questions about an image, a clear question does more than a reasoning level would: say what you want, the format of the answer and its length in one sentence. The table shows this row's values in the catalog.

qwen/qwen3.8-27b-free on LLMTR, as of 17 October 2026
PropertyValue
Model idqwen/qwen3.8-27b-free
Endpoint/v1/chat/completions
Price (per 1M tokens)$0 input / $0 output, with a daily usage quota
Context window131,042 tokens
Max output per response16,384 tokens
Inputtext, image (image_url)
Also listed on the model cardtool calling, JSON mode
Not open on this rowvideo, audio, reasoning_effort (returns 400)

What to watch in image requests

Chat Completions is stateless: in a multi-turn conversation you send the earlier messages again on every request, images included. As images pile up they share the 131,042-token context. Drop the images that later turns no longer need from the history and keep only the one the question is about.

To see how much room an image takes in the prompt, send the same question once without the image and once with it, and compare usage.prompt_tokens in the two responses; the difference is the image's share. Tokens are not charged on this row, but they do take up the context window, and in a long conversation they can bring you close to the limit sooner than you expect.

Make the question precise: in the text part, say what you are asking, the format you expect (one line, a list or a number) and the language of the answer. Cropping away the parts of the image that have nothing to do with the question, and sending text at a resolution where it stays legible, also keeps the answer focused. If you want the answer in Turkish, say so in the question.

If you want to pull fields out of an image in a structured form, try the JSON mode the model card lists for this row. The JSON article in the same series walks through asking for a JSON object with response_format and validating the result in code, step by step; use the same validation for a request that carries an image.

Free usage: 429 and the data note

HTTP 429 means one of the free usage limits has been reached; the limit can be daily or per minute, and the response carries a Retry-After header. Wait for the time the header gives and try again. If you do not want your flow to stop entirely once the quota is used up, queue the request that got the 429 or send the same request body to a paid model that accepts image input; the request format stays the same and only the model id changes. How to manage the daily quota is covered in more detail in the daily quota article we wrote for this row.

According to the data note on the model card, prompts and completions may be logged by the provider and used to improve the model. The images you send are part of the prompt as well. Do not send images that contain personal data, identity documents or customer secrets to this row; mask them first where needed, or choose another model whose data note fits the job.

Getting started: account, key and first request

Step 1: create an account at llmtr.com. Step 2: create a key under Dashboard > API Keys; the raw key is shown only once, so keep it in the LLMTR_API_KEY environment variable. Step 3: run the example above with your own image, using qwen/qwen3.8-27b-free as the model and https://llmtr.com/v1 as the base_url.

The same key works with the other models in the catalog. If you later want to move to a paid model that accepts image input, top up your balance under Dashboard > Billing and change only the model id; the request body stays the same.

Send an image to the free Qwen3.8 27B

Create an API key, turn the image into a base64 data URL and send it to https://llmtr.com/v1 with qwen/qwen3.8-27b-free.

  1. API key. Create an account at llmtr.com, create a key under Dashboard > API Keys and keep it in the LLMTR_API_KEY environment variable.
  2. Prepare the image. Encode the image file as base64 and build a data URL that carries its MIME type, such as data:image/png;base64,.
  3. Request. Set base_url to https://llmtr.com/v1 and send a message with a text part and an image_url part, using qwen/qwen3.8-27b-free as the model.

Frequently asked questions

Does the free Qwen3.8 27B accept images?

Yes, the model card lists image input for this row. Send the image in a /v1/chat/completions request as an image_url part, for example as a base64 data URL. Video and audio input are not open on this row; video_url and input_audio parts return 400.

Is qwen/qwen3.8-27b-free really free?

Yes. Input and output cost $0 per 1M tokens, and the row comes with a daily usage quota. When a limit is reached the API returns HTTP 429, and the Retry-After header tells you when you can try again.

How may the images I send be used?

According to the data note on the model card, prompts and completions may be logged by the provider and used to improve the model; images are part of the prompt. Do not send images with sensitive content to this row.

Related posts