-
Notifications
You must be signed in to change notification settings - Fork 1
Service: Rapid OCR API
Rapid OCR API is a fast, lightweight REST service that converts images to text using optical character recognition (OCR). It is built on RapidOCR and exposed via FastAPI. Send an image URL or base64-encoded image and receive the extracted text in response.
Deploy a Rapid OCR API instance at app.osaas.io/dashboard/service/rapidai-rapidocrapi.
- An OSC account (sign up at app.osaas.io)
| Field | Required | Description |
|---|---|---|
name |
Yes | Alphanumeric instance name |
No additional configuration is required — the service starts with sensible defaults.
Via the OSC dashboard:
- Go to app.osaas.io/dashboard/service/rapidai-rapidocrapi
- Click Create instance
- Enter a name (e.g.
myocr) and click Create - Wait for the instance to reach Running status
Via CLI:
osc create rapidai-rapidocrapi myocrOnce the instance is running, its URL is shown on the service page. Use the /ocr endpoint to extract text from an image:
curl -s -X POST \
https://<instance-url>/ocr \
-H "Content-Type: application/json" \
-d '{"image_path": "https://example.com/invoice.png"}'The response returns the recognised text in JSON format.
Extract text from a locally encoded image:
import base64, requests
with open("screenshot.png", "rb") as f:
b64 = base64.b64encode(f.read()).decode()
response = requests.post(
"https://<instance-url>/ocr",
json={"image_base64": b64}
)
print(response.json())The service exposes a FastAPI application with interactive API documentation at https://<instance-url>/docs.
| Endpoint | Method | Description |
|---|---|---|
/ocr |
POST | Extract text from an image (URL or base64) |
/health |
GET | Health check |
/docs |
GET | Interactive Swagger UI |