Skip to content

API Integration

This guide shows how to integrate the Sight Inference API into your application. The API provides image inference using YOLO and LLM-based models, with support for both batch and real-time streaming responses.

Base URL

https://sightapi.raku.so

Replace this with your self-hosted instance URL if applicable.

Authentication

All endpoints require an api_key. Depending on the endpoint version:

  • v1 endpoints — pass api_key as a multipart/form-data field alongside the file upload.
  • v2 endpoints — pass api_key inside the JSON request body.

The key must be allowed Predictions (chosen when the key is made). A key that was revoked or has expired is refused, and the answer says which.

Keep your API key secret

Never expose your api_key in client-side code or public repositories. Use environment variables or a secrets manager.

Endpoints

Method Path Description
POST /inference/predict/batch Batch prediction with file uploads (v1)
POST /inference/predict/stream Streaming prediction with file uploads (v1)
POST /inference/predict/batch/v2 Batch prediction with image URLs (v2)
POST /inference/predict/stream/v2 Streaming prediction with image URLs (v2)
POST /inference/assets/signed-url Generate a signed URL for a result asset

Response Codes

Code Meaning
200 Success
400 Bad request — check your parameters. An unknown key is Invalid API key provided.
401 The key was revoked or has expired; message says which and what to do
403 The key may not make predictions (it lacks the Predictions permission)
500 Server or upstream service error

Data Types

DataSchema (v2 endpoints)

Field Type Description
image_url string Public URL of the image to process
filename string Filename for identification
is_yolo boolean Run YOLO object detection
is_llm boolean Run LLM-based analysis
result_image boolean Optional, true if left out. false skips the annotated result picture: the answer comes back sooner and yolo_result_path and yolo_result_signed_url are null

PredictSchema (v2 request body)

Field Type Required Description
api_key string Yes Your API key
query string Yes Natural language query for LLM analysis
data DataSchema[] Yes List of images to process