Stream Media
curl --request GET \
--url https://api.inprocess.world/api/media/streamimport requests
url = "https://api.inprocess.world/api/media/stream"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.inprocess.world/api/media/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.inprocess.world/api/media/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.inprocess.world/api/media/stream"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.inprocess.world/api/media/stream")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.inprocess.world/api/media/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>""<string>"{
"status": "error",
"message": "Invalid or unsupported URL format"
}{
"status": "error",
"message": "Failed to stream media"
}{
"status": "error",
"message": "Unable to determine content length"
}Media
Stream Media
Stream audio or video content from decentralized storage protocols like Arweave and IPFS. This endpoint acts as a proxy that handles decentralized storage protocols and enables partial content streaming for media players.
Supported URL formats:
ar://- Arweave URLs (e.g.,ar://abc123...)ipfs://- IPFS URLs (e.g.,ipfs://Qm...)https://- Direct HTTPS URLs
The endpoint supports HTTP Range headers for seeking within media files, returning 206 Partial Content when range requests are supported by the origin.
GET
/
media
/
stream
Stream Media
curl --request GET \
--url https://api.inprocess.world/api/media/streamimport requests
url = "https://api.inprocess.world/api/media/stream"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.inprocess.world/api/media/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.inprocess.world/api/media/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.inprocess.world/api/media/stream"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.inprocess.world/api/media/stream")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.inprocess.world/api/media/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>""<string>"{
"status": "error",
"message": "Invalid or unsupported URL format"
}{
"status": "error",
"message": "Failed to stream media"
}{
"status": "error",
"message": "Unable to determine content length"
}This endpoint is public and does not require authentication.
Overview
The Media Stream API enables streaming audio and video content from decentralized storage protocols like Arweave and IPFS. It acts as a proxy that:- Converts
ar://andipfs://URLs to fetchable gateway URLs - Supports HTTP Range requests for seeking within media files
- Returns proper headers for audio and video players to function correctly
Supported URL Formats
| Protocol | Format | Example |
|---|---|---|
| Arweave | ar:// | ar://abc123xyz... |
| IPFS | ipfs:// | ipfs://QmXyz... |
| HTTPS | https:// | https://arweave.net/abc123... |
Range Request Support
The endpoint supports HTTP Range headers, allowing media players to seek to specific positions in the file. When a range request is made and supported by the origin:- Returns
206 Partial Contentstatus - Includes
Content-Rangeheader indicating the byte range - Enables efficient streaming without downloading the entire file
Example Usage
Basic Audio Request
curl "https://api.inprocess.world/api/media/stream?url=ar://your-arweave-tx-id"
Basic Video Request
curl "https://api.inprocess.world/api/media/stream?url=ipfs://QmYourVideoHash"
With Range Header (for seeking)
curl -H "Range: bytes=0-1023" \
"https://api.inprocess.world/api/media/stream?url=ar://your-arweave-tx-id"
In an HTML Audio Element
<audio controls>
<source src="https://api.inprocess.world/api/media/stream?url=ar://your-arweave-tx-id" type="audio/mpeg">
</audio>
In an HTML Video Element
<video controls>
<source src="https://api.inprocess.world/api/media/stream?url=ipfs://QmYourVideoHash" type="video/mp4">
</video>
Query Parameters
The URL of the media file to stream. Supports Arweave (ar://), IPFS (ipfs://), and HTTPS URLs.
Response
Full media content returned
The response is of type file.