{"openapi":"3.1.0","info":{"title":"Bitrate & Transfer API","version":"1.0.0","description":"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.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/bitrate-api","description":"oanor gateway"}],"tags":[{"name":"Bitrate"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/file-size":{"get":{"operationId":"get_v1_file_size","tags":["Bitrate"],"summary":"Bitrate / duration / size","description":"","parameters":[{"name":"bitrate","in":"query","required":false,"description":"Value","schema":{"type":"string"},"example":"5"},{"name":"bitrate_unit","in":"query","required":false,"description":"bps|kbps|Mbps|Gbps","schema":{"type":"string"},"example":"Mbps"},{"name":"duration","in":"query","required":false,"description":"Seconds","schema":{"type":"string"},"example":"3600"},{"name":"size","in":"query","required":false,"description":"Value","schema":{"type":"string"}},{"name":"size_unit","in":"query","required":false,"description":"B|KB|MB|GB|TB","schema":{"type":"string"},"example":"MB"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"duration":{"hours":1,"human":"1h 0m 0s","minutes":60,"seconds":3600},"file_size":{"gb":2.25,"kb":2250000,"mb":2250,"tb":0.00225,"gib":2.09548,"mib":2145.77,"tib":0.00204636,"bytes":2250000000},"bitrate_bps":5000000},"meta":{"timestamp":"2026-06-03T17:42:04.126Z","request_id":"46ae1b70-3c6a-4a9c-9475-7e6bd696098b"},"status":"ok","message":"File size","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/storage":{"get":{"operationId":"get_v1_storage","tags":["Bitrate"],"summary":"Capacity: recording hours / item count","description":"","parameters":[{"name":"capacity","in":"query","required":true,"description":"Value","schema":{"type":"string"},"example":"1"},{"name":"capacity_unit","in":"query","required":false,"description":"GB|TB","schema":{"type":"string"},"example":"TB"},{"name":"bitrate","in":"query","required":false,"description":"For recording time","schema":{"type":"string"},"example":"5"},{"name":"item_size","in":"query","required":false,"description":"For item count","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"capacity":{"gb":1000,"kb":1000000000,"mb":1000000,"tb":1,"gib":931.323,"mib":953674,"tib":0.909495,"bytes":1000000000000},"bitrate_bps":5000000,"recording_time":{"hours":444.444,"human":"444h 26m 40s","minutes":26666.7,"seconds":1600000}},"meta":{"timestamp":"2026-06-03T17:42:04.228Z","request_id":"b92d548b-8cd0-4b99-b961-87662aa2b5a5"},"status":"ok","message":"Storage","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/transfer-time":{"get":{"operationId":"get_v1_transfer_time","tags":["Bitrate"],"summary":"Download / upload time","description":"","parameters":[{"name":"size","in":"query","required":true,"description":"Value","schema":{"type":"string"},"example":"1"},{"name":"size_unit","in":"query","required":false,"description":"unit","schema":{"type":"string"},"example":"GB"},{"name":"bandwidth","in":"query","required":false,"description":"Speed","schema":{"type":"string"},"example":"100"},{"name":"bandwidth_unit","in":"query","required":false,"description":"Mbps","schema":{"type":"string"},"example":"Mbps"},{"name":"time","in":"query","required":false,"description":"Or target seconds","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"file_size":{"gb":1,"kb":1000000,"mb":1000,"tb":0.001,"gib":0.931323,"mib":953.674,"tib":0.000909495,"bytes":1000000000},"bandwidth_bps":100000000,"transfer_time":{"hours":0.0222222,"human":"1m 20s","minutes":1.33333,"seconds":80},"overhead_percent":0},"meta":{"timestamp":"2026-06-03T17:42:04.305Z","request_id":"f84ca3f9-7910-461a-afa8-d1ac85b8a9b5"},"status":"ok","message":"Transfer time","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Bitrate & Transfer API","notes":"Bitrates are decimal (1 Mbps = 1,000,000 bits/s); 8 bits = 1 byte. Sizes shown in decimal and binary units. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/file-size","params":{"size":"value","bitrate":"value","duration":"seconds","size_unit":"B|KB|MB|GB|TB|MiB|GiB (give any two)","bitrate_unit":"bps|kbps|Mbps|Gbps"},"returns":"the missing one of bitrate/duration/size"},{"path":"/v1/transfer-time","params":{"size":"value","time":"or a target time in s","bandwidth":"speed","size_unit":"…","bandwidth_unit":"Mbps","overhead_percent":"optional"},"returns":"the transfer time (or required bandwidth)"},{"path":"/v1/storage","params":{"bitrate":"for recording time","capacity":"value","item_size":"for item count","capacity_unit":"GB"},"returns":"recording hours or item count"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"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 in 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."},"meta":{"timestamp":"2026-06-03T17:42:04.408Z","request_id":"0fc07113-02b0-4db0-8275-d4ade42c765b"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":8435,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":995,"monthly_call_quota":17950,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2985,"monthly_call_quota":230500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6785,"monthly_call_quota":1195000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/bitrate-api"}