Core concepts
Vision & image analysis
Multimodal models such as NGen-4.3 Pro can reason over images alongside your text prompt. Send images inline with a completion, or upload a file to the dedicated vision route.
Inline images on /infer
Pass one or more base64-encoded images in the images array of an /infer request.
bash
curl https://api.tnsaai.com/infer \
-H "x-api-key: $TNSA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "NGen-4.3-Pro",
"prompt": "Identify the labels on this diagram and summarize the workflow steps.",
"images": [
"/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQ..."
]
}'Upload route: POST /vision
Upload an image file directly as multipart form data. Fields:
file— raw binary image (PNG, JPG, BMP).prompt— your question or instructions.model— multimodal model id (defaultNGen-4.3-Pro).
bash
curl https://api.tnsaai.com/vision \
-H "x-api-key: $TNSA_API_KEY" \
-F "file=@diagram.png" \
-F "model=NGen-4.3-Pro" \
-F "prompt=Summarize the main steps in this diagram."Tips
- Use clear, high-resolution images for the best results.
- Ask specific questions ("read the values in the table") rather than open-ended ones.
- You can send multiple images in one request to compare or cross-reference them.