Image inputs
Send JPEG or PNG images as inline base64 or public HTTPS URLs. Choose a model with supports_image_input: true in /v1/catalog/models. Check image_input for limits and supported_endpoints for available APIs.
Send an image URL
Choose your API and language, then replace my-vision-model and the example image URL. Each example sends the image in a user message and prints the answer.
/v1/chat/completionsimport os
from openai import OpenAI
client = OpenAI(
base_url="https://api.boardwalk.cloud/v1",
api_key=os.environ["BOARDWALK_API_KEY"],
)
response = client.chat.completions.create(
model="my-vision-model",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image."},
{
"type": "image_url",
"image_url": {"url": "https://example.com/photo.jpg"}
}
]
}
],
max_completion_tokens=1024,
)
print(response.choices[0].message.content)
print(response.usage)SDK setup: pip install openai · npm install openai. cURL needs no SDK.
Send a local image
Save a PNG as photo.png and use your vision model’s name. The SDK examples read and encode the file locally; the cURL example uses the shell’s base64 command.
/v1/chat/completionsimport os
import base64
from pathlib import Path
from openai import OpenAI
client = OpenAI(
base_url="https://api.boardwalk.cloud/v1",
api_key=os.environ["BOARDWALK_API_KEY"],
)
image_base64 = base64.b64encode(Path("photo.png").read_bytes()).decode("ascii")
response = client.chat.completions.create(
model="my-vision-model",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image."},
{
"type": "image_url",
"image_url": {"url": "data:image/png;base64," + image_base64}
}
]
}
],
max_completion_tokens=1024,
)
print(response.choices[0].message.content)
print(response.usage)SDK setup: pip install openai · npm install openai. cURL needs no SDK.
OpenAI Chat Completions and Responses use data URLs. Anthropic Messages uses base64 source blocks. For JPEG, use image/jpeg and your JPEG filename. Boardwalk does not require file uploads or file IDs.
Chat Completions accepts images in user messages only. Responses function outputs and Messages tool results also accept images when the model supports the required capabilities.
Limits
- At most four images per request, including history and tool results.
- JPEG or PNG; each decoded file is at most 3 MiB, 4096 pixels per side, and 4,194,304 pixels total.
- The complete inference or tokenization body is at most 9 MiB. Four inline images must average under about 2 MiB each; send larger ones by URL.
- OpenAI detail may be omitted or auto. low and high are rejected.
- URLs must use HTTPS on port 443 and be publicly reachable without credentials or custom headers. Private network addresses are rejected, including through redirects.
- URL downloads have a ten-second total limit and at most three redirects. Signed URLs may work if they satisfy these rules.
Token counts and privacy
Images count toward input tokens; their base64 encoding does not count as text. Recount with /v1/tokenize using the same Chat-shaped messages. Use identical inline bytes for reproducible counts; URL content can change.
Boardwalk does not store images, prompts, or completions. URL validation failures before a request reaches a card are not billed. Requests that reach a card follow the same billing and receipt rules as text.
Image input currently supports catalog models served from qualified Qwen2.5-VL checkpoints, with text output. Models you deploy take text input only. Tool calling requires separate model support. Vision adapters, other model families, WebP/GIF, PDFs, audio, video, and image generation are unsupported.