Router9
Documentation
API Reference

Vision Tool

Image understanding, OCR, and generation capabilities

Image Description

Analyze images using AI vision models.

Endpoint

POST /v1/vision/describe

Request

curl https://api.router9.com/v1/vision/describe \
  -H "Authorization: Bearer sk-r9k-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "mediaUrl": "https://example.com/photo.jpg",
    "prompt": "What is in this image?"
  }'
ParameterTypeRequiredDescription
mediaUrlstringOne of mediaUrl/mediaBase64URL to image
mediaBase64stringOne of mediaUrl/mediaBase64Base64-encoded image
promptstringNoSpecific question about the image

Response

{
  "success": true,
  "result": {
    "text": "The image shows a modern office space with developers working at their desks, multiple monitors displaying code editors."
  }
}

OCR (Text Extraction)

Extract all visible text from images — printed text, handwriting, signs, and labels.

Endpoint

POST /v1/vision/ocr

Request

curl https://api.router9.com/v1/vision/ocr \
  -H "Authorization: Bearer sk-r9k-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "mediaUrl": "https://example.com/document.jpg"
  }'
ParameterTypeRequiredDescription
mediaUrlstringOne of mediaUrl/mediaBase64URL to image
mediaBase64stringOne of mediaUrl/mediaBase64Base64-encoded image

Response

{
  "success": true,
  "tool": "vision.ocr",
  "result": {
    "blocks": [
      { "text": "Invoice #1234", "confidence": 0.98, "type": "printed" },
      { "text": "Total: $150.00", "confidence": 0.95, "type": "printed" }
    ],
    "fullText": "Invoice #1234\nTotal: $150.00"
  }
}

Image Generation

Generate images from text descriptions.

Endpoint

POST /v1/image/generations

Request

curl https://api.router9.com/v1/image/generations \
  -H "Authorization: Bearer sk-r9k-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A futuristic city skyline at sunset, digital art"
  }'
ParameterTypeRequiredDescription
promptstringYesDescription of the image to generate

Response

{
  "created": 1714000000,
  "data": [
    {
      "b64_json": "iVBORw0KGgo...",
      "revised_prompt": "A futuristic city skyline at sunset, digital art"
    }
  ]
}

Quotas

PlanImage UnderstandingImage Generation
Free5/period5/period
Assistant50/period50/period
Engineer1,000/period1,000/period

On this page