API
Learn how to interact with the oJo API.
Base URL
https://api.ojo.so
Authentication
To authenticate with the API, you need to provide an API key in the Authorization
header.
Authorization: Bearer <Your API Key>
You can obtain your API key from the API settings (opens in a new tab).
Response Codes
The API uses standard HTTP response codes to indicate the success or failure of an API request.
200 OK
- Everything worked as expected.400 Bad Request
- The request was unacceptable, often due to missing a required parameter.401 Unauthorized
- No valid API key provided.402 Payment Required
- The request requires payment.403 Forbidden
- The API key doesn't have permissions to perform the request.404 Not Found
- The requested resource doesn't exist.408 Request Timeout
- The request took too long to process.422 Unprocessable Entity
- The request was well-formed but was unable to be followed due to validation errors.429 Too Many Requests
- Too many requests hit the API too quickly.500 Internal Server Error
- We had a problem with our server. Try again later.503 Service Unavailable
- We're temporarily offline for maintenance. Please try again later.
Rate Limits
Learn about the rate limits of the oJo API.
Currently, API is capped at 15 requests per minute per user. Burst limit is set to 5 requests per second.
This is implemented to ensure a fair usage policy so that excessive use by a single user does not adversely affect the performance and usage of the API by others.
If you exceed this limit, you will receive a 429 Too Many Requests
response.
Resource Limits
To ensure optimal performance and fair usage, the API imposes limits on the size and type of a resource that can be processed:
- Document:
1MB
- Script:
1MB
- Stylesheet:
1MB
- Image:
5MB
- Font:
1MB
The total size of all resources for a single request must not exceed 10MB
.
Resources must be served over HTTPS, except for images which can also use data URIs.
If a resource exceeds its individual limit or contributes to exceeding the total limit, it will be blocked, and you may receive an error message.
Caveats
oJo API is currently in public beta and subject to change. We will do our best to notify you of any changes.