API reference
Image input
Send images to a model with published vision support.
OPENAI BASE URL
https://www.modelmesh.in/api/v1Confirm support first
Choose a model with vision capabilities. ModelMesh does not add vision to a text-only model. Chat Completions is not an image generation endpoint.
Use multimodal messages
A user message can contain text and image_url blocks. Replace YOUR_IMAGE_URL in the example with an image your application is authorized to share and the provider can access.
Costs and privacy
Image token accounting varies by provider. The text cost planner cannot accurately estimate image charges. Share only necessary content and review the provider's requirements.
Request example
POST
https://www.modelmesh.in/api/v1/chat/completionsReplace the key placeholder before running this example. This page does not send requests. Paid requests consume your allowance or funds.
$env:MODELMESH_API_KEY = 'YOUR_MODELMESH_KEY'
Invoke-RestMethod -Method Post -Uri 'https://www.modelmesh.in/api/v1/chat/completions' `
-Headers @{Authorization="Bearer $env:MODELMESH_API_KEY"} `
-ContentType 'application/json' `
-Body '{
"model": "YOUR_MODEL_ID",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image."
},
{
"type": "image_url",
"image_url": {
"url": "YOUR_IMAGE_URL"
}
}
]
}
],
"max_tokens": 64
}'