Fit dimensions into a box
API · /aspectratio-api
Aspect Ratio API
Aspect-ratio and resize maths on plain dimensions — no image upload needed. The ratio endpoint reduces a width×height to its simplest integer ratio (1920×1080 → 16:9), its decimal value and a common name. The resize endpoint scales a dimension while preserving the ratio: give a new width or a new height and get the other side. The fit endpoint fits a source size into a target box using contain (letterbox) or cover (crop), returning the resulting size, the scale factor and the centering offset. Perfect for responsive layouts and CSS aspect-ratio, video and thumbnail framing, image-grid planning and print sizing. Pure local computation — it works on numbers only and never touches image files. Live, nothing stored. 4 endpoints. Distinct from image processing/resizing (which operates on actual files) and from geometry of shapes.
API health
healthy- Uptime
- 100.00%
- Server probes · 24h
- Avg latency
- 87 ms
- Server probes · 24h
- Subscribers
- 4,198
- active
- Total calls
- 60
- last 7 days
Pricing
Pick a tier — billed monthly, cancel anytime.
Free
Free
- 840 calls / month
- 2 requests / second
- Hard cap (429 above quota, no overage)
- 840 calls/month
- 2 req/sec
- Ratio + resize + fit
- No credit card
Starter
€1.50 /month
- 6,900 calls / month
- 8 requests / second
- Hard cap (429 above quota, no overage)
- 6.9k calls/month
- 8 req/sec
- Contain + cover + offsets
- Email support
Pro
€19.80 /month
- 129,000 calls / month
- 20 requests / second
- Hard cap (429 above quota, no overage)
- 129k calls/month
- 20 req/sec
- Layout / media pipelines
- Priority support
Mega
€55.80 /month
- 665,000 calls / month
- 50 requests / second
- Hard cap (429 above quota, no overage)
- 665k calls/month
- 50 req/sec
- Platform scale
- Dedicated SLA
Built by
Related APIs
Other APIs with overlapping tags.
Image API
Inspect image metadata (dimensions, format, size, colour space, transparency) and resize or convert images between JPEG, PNG, WebP and AVIF straight from a URL. Perfect for thumbnails, format optimisation and on-the-fly image transforms.
api.oanor.com/image-api
Keyboard Layout API
Re-map text between keyboard layouts — the fix for text typed with the keyboard set to the wrong layout. The remap endpoint takes text, a source layout and a target layout, and rewrites each character to the one produced by the same physical key on the other layout. So text accidentally typed on a Dvorak-configured keyboard while you meant QWERTY (or the reverse) is recovered exactly, and because the mapping is position-preserving it round-trips perfectly. It supports QWERTY (US), Dvorak and Colemak, including the shifted symbols, and leaves characters that are not on a remappable key (spaces and accents) untouched. The layouts endpoint returns the full key map for each layout. Everything is computed locally and deterministically, so it is instant and private. Ideal for fixing wrong-layout typing, building text editors and IME tools, layout-learning aids, and cross-layout search. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This remaps between keyboard layouts; for classical ciphers (Caesar, ROT13, Morse) use a cipher API.
api.oanor.com/keyboardlayout-api
Bitrate & Transfer API
Media, file-size and data-transfer maths as an API. The file-size endpoint relates bitrate, duration and file size: give any two and it computes the third — so you can find the size of a video at a given bitrate and length, the bitrate of a file of known size and length, or how long a file will play. The transfer-time endpoint computes how long a file takes to download or upload over a given bandwidth (with optional protocol overhead), or the bandwidth needed to move it within a target time. The storage endpoint works out how many hours of media at a bitrate, or how many items of a given size, fit in a storage capacity. Bitrates use decimal units (kbps, Mbps, Gbps) and sizes are reported in both decimal (KB/MB/GB/TB) and binary (KiB/MiB/GiB/TiB). Everything is computed locally and deterministically, so it is instant and private. Ideal for video and audio encoding, streaming and CDN planning, storage and backup sizing, and download-time estimates. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is bitrate and transfer maths; for plain byte-unit conversion use a bytes API.
api.oanor.com/bitrate-api
Subtitle API
Work with subtitle and caption files — parse, convert and re-sync, entirely locally. The parse endpoint reads SubRip (.srt) or WebVTT (.vtt) text into clean, structured cues — index, start, end (as both HH:MM:SS,mmm timecodes and milliseconds), duration and the cue text (multi-line preserved) — auto-detecting which format you sent. The convert endpoint converts between SRT and WebVTT, getting the details right: the timestamp separator (comma for SRT, dot for WebVTT), adding or removing the WEBVTT header, and renumbering cues. The shift endpoint moves every timestamp by an offset in milliseconds, positive or negative, to fix a track that runs early or late, clamping at zero so nothing goes negative. Everything is computed locally and deterministically, so it is instant and private — your media files never leave the request. Ideal for video and streaming pipelines, caption editors and players, localization and translation workflows, accessibility, and fixing out-of-sync subtitles. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This handles subtitle files; for SMPTE video timecode (HH:MM:SS:FF) use a timecode API.
api.oanor.com/subtitle-api
Frequently asked questions
Quick answers about pricing, quotas, and integration.
How do I get an API key for Aspect Ratio API?
What's the rate limit for Aspect Ratio API?
How much does Aspect Ratio API cost?
Can I cancel my subscription anytime?
Is Aspect Ratio API GDPR-compliant?
Pick an endpoint from the list on the left to see its details and try it.
Code snippets
Sign up to get an API key, then call any path under your slug.
curl https://api.oanor.com/aspectratio-api/SOME_PATH \
-H "x-oanor-key: oanor_test_..."
const res = await fetch("https://api.oanor.com/aspectratio-api/SOME_PATH", {
headers: { "x-oanor-key": "oanor_test_..." }
});
const data = await res.json();
$ch = curl_init("https://api.oanor.com/aspectratio-api/SOME_PATH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
$response = curl_exec($ch);
import requests
r = requests.get(
"https://api.oanor.com/aspectratio-api/SOME_PATH",
headers={"x-oanor-key": "oanor_test_..."},
)
print(r.json())
Ratings
Sign in to rate.
No reviews yet.
Discussion
Ask questions, share usage tips, get answers from the provider and other developers. Public — anyone can read.
Sign in to start a thread or reply.
Sign inNew thread
·
-
Provider answer
🔒 This thread is locked — no new replies.
-
·
- No threads yet — start the discussion.
Support
Private 1:1 support with the provider — billing questions, integration issues, account problems. Only you and the provider team can see these threads.
Sign in to open a support ticket.
Sign inOpen new ticket
Describe what you need help with. The provider team gets an email and replies on the ticket page.
-
·
Urgent - No tickets yet for this API.