ConcurredConcurred API

Vision API (Legacy)

Standalone Grok Vision API — use Chat API or Gateway API instead

Legacy Endpoint

This standalone Vision API is legacy. We recommend using vision through the main APIs instead:

  • Gateway API — Send images via OpenAI multimodal format across GPT, Claude, Gemini, Grok
  • Chat API — Image analysis in chat, battle, and fight modes

The standalone /api/v1/vision endpoint remains available for Grok-specific image analysis with base64 support, but will not receive new features.


Analyze Image (URL)

POST /api/v1/vision

{
  "model": "grok",
  "image": {
    "type": "image_url",
    "image_url": "https://example.com/photo.jpg"
  },
  "prompt": "What is in this image?",
  "stream": false
}

Response

{
  "id": "vision-abc123",
  "object": "vision.completion",
  "model": "grok-4-1-fast",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "This image shows..."
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 10,
    "completion_tokens": 50,
    "total_tokens": 60
  }
}

Analyze Image (Base64)

POST /api/v1/vision

{
  "model": "grok",
  "image": {
    "type": "image_base64",
    "image_base64": {
      "data": "iVBORw0KGgoAAAANSUhEUgAA...",
      "media_type": "image/png"
    }
  },
  "prompt": "Describe this image",
  "stream": false
}

Parameters

ParameterTypeRequiredDescription
modelstringYes"grok" or "grok-4-1-fast"
imageobjectYesImage object
image.typestringYes"image_url" or "image_base64"
image.image_urlstringConditionalURL of the image
image.image_base64.datastringConditionalBase64-encoded image data
image.image_base64.media_typestringConditionalMIME type (image/png, image/jpeg, image/gif, image/webp)
promptstringYesQuestion about the image
streambooleanNoEnable streaming (default: false)

List Vision Models

GET /api/v1/vision

Returns available vision models.

Example

curl https://agent-heavy.vercel.app/api/v1/vision \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok",
    "image": {"type": "image_url", "image_url": "https://example.com/photo.jpg"},
    "prompt": "What is in this image?"
  }'

On this page