curl -X PATCH https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/settings \
-H "x-api-key: $STREAMPIXEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"maxRunTime": 60, "primaryCodec": "H264", "resX": 1920, "resY": 1080}'
const res = await fetch(
'https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/settings',
{
method: 'PATCH',
headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ maxRunTime: 60, primaryCodec: 'H264', resX: 1920, resY: 1080 }),
}
);
const body = await res.json();
if (!res.ok) console.error(body.code, body.message, body.unknown ?? body.invalid ?? body.inconsistent);
import os, requests
r = requests.patch(
"https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/settings",
headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]},
json={"maxRunTime": 60, "primaryCodec": "H264", "resX": 1920, "resY": 1080},
)
print(r.status_code, r.json())
{
"projectId": "664f1a2b3c4d5e6f7a8b9c0d",
"updated": ["maxRunTime", "primaryCodec", "resX", "resY"],
"settings": { "maxRunTime": 60, "primaryCodec": "H264", "resX": 1920, "resY": 1080 }
}
{
"code": "VALIDATION_FAILED",
"message": "Field(s) not settable here: allowedUsers, region",
"unknown": ["allowedUsers", "region"]
}
{
"code": "VALIDATION_FAILED",
"message": "primaryCodec must be one of AV1, H264, VP8, VP9; maxRunTime must be an integer between 1 and 1440",
"invalid": [
{ "field": "primaryCodec", "reason": "must be one of AV1, H264, VP8, VP9" },
{ "field": "maxRunTime", "reason": "must be an integer between 1 and 1440" }
]
}
{
"code": "VALIDATION_FAILED",
"message": "minBitrate (2000) must not exceed maxBitrate (500)",
"inconsistent": ["minBitrate (2000) must not exceed maxBitrate (500)"]
}
Update Project Settings
Change a project’s streaming and player settings from an allow-list. Anything else is refused by name.
PATCH
/
api
/
v1
/
projects
/
{projectId}
/
settings
curl -X PATCH https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/settings \
-H "x-api-key: $STREAMPIXEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"maxRunTime": 60, "primaryCodec": "H264", "resX": 1920, "resY": 1080}'
const res = await fetch(
'https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/settings',
{
method: 'PATCH',
headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ maxRunTime: 60, primaryCodec: 'H264', resX: 1920, resY: 1080 }),
}
);
const body = await res.json();
if (!res.ok) console.error(body.code, body.message, body.unknown ?? body.invalid ?? body.inconsistent);
import os, requests
r = requests.patch(
"https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/settings",
headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]},
json={"maxRunTime": 60, "primaryCodec": "H264", "resX": 1920, "resY": 1080},
)
print(r.status_code, r.json())
{
"projectId": "664f1a2b3c4d5e6f7a8b9c0d",
"updated": ["maxRunTime", "primaryCodec", "resX", "resY"],
"settings": { "maxRunTime": 60, "primaryCodec": "H264", "resX": 1920, "resY": 1080 }
}
{
"code": "VALIDATION_FAILED",
"message": "Field(s) not settable here: allowedUsers, region",
"unknown": ["allowedUsers", "region"]
}
{
"code": "VALIDATION_FAILED",
"message": "primaryCodec must be one of AV1, H264, VP8, VP9; maxRunTime must be an integer between 1 and 1440",
"invalid": [
{ "field": "primaryCodec", "reason": "must be one of AV1, H264, VP8, VP9" },
{ "field": "maxRunTime", "reason": "must be an integer between 1 and 1440" }
]
}
{
"code": "VALIDATION_FAILED",
"message": "minBitrate (2000) must not exceed maxBitrate (500)",
"inconsistent": ["minBitrate (2000) must not exceed maxBitrate (500)"]
}
Partial update of a project’s streaming and player settings. Send only the fields you want to change. Validation is all-or-nothing: if any field is unknown, out of range or inconsistent with the stored values, nothing is written and the response names the field.
Scope:
control. Team members need the Editor role or above. Limited to 30 control calls per minute per account.Path parameters
string
required
The project to update.
Headers
string
required
An API key issued with the
control scope.Request body
Any subset of the fields below.Stream
integer
Render width, 320 to 7680, even.
integer
Render height, 240 to 4320, even.
string
AV1, H264, VP8 or VP9.string
Codec used when the browser cannot decode the primary one. Same values. (The field name is spelled
fallbaCodec.)integer
kbps, 100 to 200000. Must not exceed
maxBitrate.integer
kbps, between
minBitrate and maxBitrate.integer
kbps, 100 to 200000.
boolean
Relay all media through TURN. For audiences behind strict corporate firewalls.
boolean
Serve the player assets from the CDN.
Session rules
integer
Maximum session length in minutes, 1 to 1440. Sessions end with code
4004 when reached.integer
Inactivity timeout in seconds, 0 to 86400.
0 disables it; idle viewers then hold a GPU slot indefinitely.string
public or programmatic. Password and SSO access modes need companion settings and are configured in the dashboard.string
Comma-separated list of domains allowed to embed the player, e.g.
"app.example.com, www.example.com". Schemes and paths are stripped. An empty list allows any domain.boolean
Distribute processed builds automatically. When
false, builds stop at Ready until Set Active Build.Resolution and quality presets
string
Dynamic Resolution Mode, Fixed Resolution Mode or Crop on Resize Mode.string
Desktop start resolution:
360p (640x360), 480p (854x480), 720p (1280x720), 1080p (1920x1080), 1440p (2560x1440) or 4K (3840x2160).string
Tablet start resolution, same values.
string
Mobile start resolution, same values.
string
Upper bound viewers may pick, same values.
Player and input
string
Project name, up to 120 characters.
string
Extra Unreal launch arguments, up to 500 characters.
integer
Milliseconds, 0 to 60000.
string
Loading screen line 1, up to 200 characters.
string
Loading screen line 2.
string
Loading screen line 3.
boolean
Mouse hover without click.
boolean
Forward keyboard input.
boolean
Forward mouse input.
boolean
Forward touch input.
boolean
Forward gamepad input.
boolean
Forward XR input.
boolean
Translate touch to mouse events.
boolean
Show the player’s control bar.
boolean
Show the resolution picker.
boolean
Show the volume control.
boolean
Show the info button.
boolean
Show the network indicator.
boolean
Show the microphone control.
boolean
Show the camera control.
boolean
Warn viewers whose network blocks UDP.
Webhooks
string
Public
https:// endpoint for webhooks. Private and cluster-internal addresses are refused. Send "" to remove.string[]
Events to deliver, e.g.
["build.approved", "build.rejected"]. Up to 20.Response
string
The project id.
string[]
The fields written.
object
Those fields with their stored values.
curl -X PATCH https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/settings \
-H "x-api-key: $STREAMPIXEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"maxRunTime": 60, "primaryCodec": "H264", "resX": 1920, "resY": 1080}'
const res = await fetch(
'https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/settings',
{
method: 'PATCH',
headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ maxRunTime: 60, primaryCodec: 'H264', resX: 1920, resY: 1080 }),
}
);
const body = await res.json();
if (!res.ok) console.error(body.code, body.message, body.unknown ?? body.invalid ?? body.inconsistent);
import os, requests
r = requests.patch(
"https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/settings",
headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]},
json={"maxRunTime": 60, "primaryCodec": "H264", "resX": 1920, "resY": 1080},
)
print(r.status_code, r.json())
{
"projectId": "664f1a2b3c4d5e6f7a8b9c0d",
"updated": ["maxRunTime", "primaryCodec", "resX", "resY"],
"settings": { "maxRunTime": 60, "primaryCodec": "H264", "resX": 1920, "resY": 1080 }
}
{
"code": "VALIDATION_FAILED",
"message": "Field(s) not settable here: allowedUsers, region",
"unknown": ["allowedUsers", "region"]
}
{
"code": "VALIDATION_FAILED",
"message": "primaryCodec must be one of AV1, H264, VP8, VP9; maxRunTime must be an integer between 1 and 1440",
"invalid": [
{ "field": "primaryCodec", "reason": "must be one of AV1, H264, VP8, VP9" },
{ "field": "maxRunTime", "reason": "must be an integer between 1 and 1440" }
]
}
{
"code": "VALIDATION_FAILED",
"message": "minBitrate (2000) must not exceed maxBitrate (500)",
"inconsistent": ["minBitrate (2000) must not exceed maxBitrate (500)"]
}
Errors
| Status | code | Cause |
|---|---|---|
400 | VALIDATION_FAILED | Unknown field (unknown), out-of-range value (invalid), or a cross-field conflict with stored values (inconsistent). Nothing was written. |
400 | — | Invalid webhook URL: … when the URL points at a private address. |
403 | API_KEY_SCOPE | The key was issued without control. |
403 | — | The project belongs to another account, or the team role cannot edit projects. |
404 | NOT_FOUND | No project with that id. |
429 | RATE_LIMITED | More than 30 control calls in a minute. |
Changes apply to sessions that start after the call. Running sessions keep the settings they launched with; call End Sessions if everyone must pick up the new values now.