Sociaro

pruna/p-video-upscale

Pruna's P-Video-Upscale, served direct from Pruna.

A video up to 512 MiB goes in; the same video comes back at 720p, 1080p (the default), 2k or 4k, optionally at a frame rate you set from 16 to 60 fps.

Billed per second of the finished video, rounded up, at a rate set by its size (the target, or a larger tier when the video comes back larger) and by its frame rate: above 30 fps it doubles. 720p $0.01, 1080p $0.02, 2k $0.04, 4k $0.08 per second up to 30 fps.

With turbo the rate is about a third of that, at any frame rate: 720p $0.0035, 1080p $0.007, 2k $0.014, 4k $0.028.

The generator's safety filter is always on.

Your use of the Pruna models and of their outputs is subject to Pruna's Terms of Service, including its Acceptable Use Policy (section 10), and to the licence of the model each one is built on.

You must follow them, and you may not use the outputs to train or improve a competing AI model.

If you make these models or their outputs available to your own users, you must bind them to restrictions at least as protective and tell them these restrictions apply.

Slugpruna/p-video-upscale
Kindvideo
Vendorpruna
EndpointPOST /v1/pruna/generations

Charged per job from what the generator reports it rendered — your Logs show the exact figure for each one; see balance and billing.

Calling it

curl https://api.sociaro.com/v1/pruna/generations \
  -H "Authorization: Bearer $SOCIARO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "model": "pruna/p-video-upscale",
        "input": {"video": "https://your-cdn.example.com/clip.mp4"}
      }'

# then poll the job id it returns:
curl https://api.sociaro.com/v1/pruna/generations/JOB_ID \
  -H "Authorization: Bearer $SOCIARO_API_KEY"

Parameters

P-Video-Upscale — upscale a video to 720p, 1080p, 2k or 4k

FieldTypeRequiredDefaultValuesWhat it does
input.videostringyes—a public https urlThe video to upscale, up to 512 MiB.
input.targetstringno1080p720p · 1080p · 2k · 4kA preset for the picture's pixel area; the aspect ratio is kept. Sets the per-second rate, unless the video comes back larger: it is then billed at its own size's rate.
input.fpsintegernothe source's16–60The frame rate of the result. Higher than the source's is interpolated. Above 30 fps the per-second rate doubles; with `turbo` it does not.
input.turbobooleannofalsetrue · falseFaster processing, at its own lower per-second rate: about a third of the standard one, at any frame rate.

Anything not listed here is refused rather than ignored, so a typo fails loudly instead of quietly producing something else.

Worked example

curl https://api.sociaro.com/v1/pruna/generations \
  -H "Authorization: Bearer $SOCIARO_API_KEY" -H "Content-Type: application/json" \
  -d '{ "model": "pruna/p-video-upscale",
        "input": { "video": "https://example.com/clip.mp4", "target": "1080p" } }'

curl https://api.sociaro.com/v1/pruna/generations/{job_id} -H "Authorization: Bearer $SOCIARO_API_KEY"

Submit and poll. Send pruna/p-video-upscale to POST /v1/pruna/generations and poll GET /v1/pruna/generations/{job_id}. It is also served on the Jobs API (POST /v2/jobs), with the same input; there, the result is a cdn.sociaro.com link kept for at least ten years (expires_at).

How it is billed. Per second of the video that comes back, read from the finished file when the job completes and billed in whole seconds, rounded up. The rate follows the size of that video and its frame rate (the source's, or fps when you set it). The size is target, or a larger tier when the video comes back larger than the target: the result is billed at the tier of the video you receive, never below target, and above 4k is billed as 4k. A 4K source sent with target: 720p, for example, comes back at 4K and is billed at the 4k rate. A frame up to 5% over a tier's pixel area counts as that tier; a larger one counts as the next tier up (a 1600×900 result sent with target: 720p is billed at the 1080p rate). Above 30 fps the standard rate doubles. With turbo: true the turbo rate applies instead: about a third of the standard one, at any frame rate. The source's length sets the seconds returned, and so the total. A 10 second result at 1080p and 24 fps is $0.20, the same at 60 fps is $0.40, and the same with turbo is $0.07 at either.

Tier Up to 30 fps, per second Above 30 fps, per second With turbo, per second
720p $0.01 $0.02 $0.0035
1080p $0.02 $0.04 $0.007
2k $0.04 $0.08 $0.014
4k $0.08 $0.16 $0.028

Limits. The generator processes at most 2400 frames at 720p, 1200 at 1080p, 600 at 2k and 300 at 4k; a longer video is refused, so choose a lower target for it. Above 30 fps, 30 frames of each second are processed. A job whose finished video the gateway cannot read stays processing and is never billed.

The generator's content check stays on: enable_safety_filter is set by the gateway, and a request that sends it with another value is a 400.

How a job runs

Generation takes longer than a request should wait, so it goes in three moves: submit, then poll, then collect.

# 1. submit — the model id plus the fields above
curl -sS https://api.sociaro.com/v1/alibaba/generations \
  -H "Authorization: Bearer $SOCIARO_API_KEY" -H "Content-Type: application/json" \
  -d '{ "model": "…", "prompt": "…" }'
# -> { "job_id": "<id>", "status": "submitted" }

# 2. poll every 3-5 s for images, 5-10 s for video
curl -sS https://api.sociaro.com/v1/alibaba/generations/<id> \
  -H "Authorization: Bearer $SOCIARO_API_KEY"
# -> { "job_id": "…", "status": "processing" }
# -> { "job_id": "…", "status": "completed", "model": "…",
#      "media_url": "https://api.sociaro.com/v1/media/<media_id>" }
# -> { "job_id": "…", "status": "failed", "model": "…", "error": { "code": …, "message": … } }

# 3. collect within the hour — the opaque id IS the credential, no header needed
curl -sSL "https://api.sociaro.com/v1/media/<media_id>" -o out.mp4

Use the job_id verbatim as the path segment when polling: the two names are the same value. Which submit and poll URL this model uses is at the top of this page, under Calling it.

Reading the poll

status is one of processing · completed · failed. Only completed carries media_url, only failed carries error.

Gate on status, never on the poll's HTTP code. A poll-time failure is HTTP 200 with status: "failed" and an error object of { "code", "message" }, plus provider_code when the generator supplied one — on every failure branch, including one where the result could not be delivered. A submit-time rejection is different: it comes back as its own HTTP status with the reason in the body.

code is ours and stable; message is the generator's. Match on code: it comes from a small fixed set, and provider_failed still means what it always meant. A rejection of what you sent — a size out of range, an unusable input — additionally sets code: "invalid_request", because that is a different thing for your code to do. message now carries the generator's own sentence, and provider_code its own code (OutputVideoSensitiveContentDetected.PolicyViolation, IPInfringementSuspect), so a moderated generation, a copyright refusal and a broken renderer are finally distinguishable. Treat provider_code as informational: the vendors change these strings without telling us, so branch on ours.

message is variable text, capped at 400 characters. It used to be a single fixed 43-character sentence, so if you compare it by equality or keep it in a narrower column, that needs changing — match on code, and on provider_code when you need the finer distinction.

Two things that text is not. It does not name the generator behind the model: the names of the services and hosts that actually run your job are substituted out before you see it, so do not parse it for one. What it does not hide is a name you already have — the halves of the model id you called (alibaba, bytedance, wan, qwen, seedance, seedream, happyhorse) stay as written, because blanking those would garble the message exactly where it is useful: Model alibaba/wan-2-7-image not found has to survive intact. And the text can quote your own request back: a moderation message often contains the fragment it objected to. That is why we do not write it into our own logs, and why forwarding or storing a failed poll's message is your decision to make rather than something to do by default.

Collecting the result

media_url points at our host, not the generator's. It is a capability: the opaque id is the credential, so no Authorization header is needed and anyone holding the link can fetch it. It expires within the hour — download rather than store the link.

Several images are not optional extras. An Alibaba image model asked for more than one picture (n above 1) is charged for the number of pictures the generator reports making, and every link it returns is delivered, never fewer than that number: media_urls lists all of them in the generator's order (present on every image result, even a single one) and media_url is the first. Each has its own link and its own expiry. If any one of them cannot be delivered the job is reported failed and nothing is charged — unlike a still or a layer, an image you paid for is never left out.

Rules the gateway adds

Two fields are ours and never reach the generator:

Field Notes
model which model to run
user your own end-user id. Recorded against this job's spend so you can attribute cost per end user, and stripped before the request leaves us, so the generator never sees it. Validated BEFORE the job is created, so a rejection is free: a string of at most 128 characters, no control characters, valid UTF-8. Omitting it, or sending null, is fine and simply records no end user

An unknown field is always a 400. Most generators reject one themselves; some accept it, ignore it, render something other than what you asked for and bill you — so we refuse it for you. Either way you get 400 unknown field(s): [...] naming the offender, never a surprise render.

Ranges and enums are the generator's own and we do not re-validate most of them, so an out-of-range value comes back as its rejection, in its wording and with its numbers. The one thing we DO check ourselves is resolution, because an unsupported tier is silently ignored rather than refused: you would ask for the higher tier, be handed a lower one, and be charged. The tiers on this page are read from what the vendor prices, so they change when the vendor publishes one.

Authentication

Authorization: Bearer <your-api-key> on submit and on poll. The key must be valid AND granted this model — 403 otherwise.

One deliberate exception on poll: a key that is over budget may still poll and collect a job it already submitted, so work you have already paid for is never stranded by a budget that ran out mid-generation. While the key is over budget the gateway cannot read its model list at all, so the per-model grant is not re-checked on those polls — a grant revoked after submit still collects that job. Ownership is always enforced: a job can only be polled by the key that created it, and submit is always refused in that state.