Skip to content

DocsAPI referenceOperations

Estimate an AI upscale

What POST /v1/ai-upscale with the same body would reserve under your plan, and how long it is expected to take. No job is made, nothing is fetched and no credits are used. The input is not read, so the clip is the trim's duration or the plan's longest, both frame-rate bands are given, and the enhancement (full or faithful) is not known yet: it is chosen from the input's size. A scoped API key needs the jobs:run scope (full keys may call it).

POST /v1/ai-upscale/estimate

Needs an API key: Authorization: Bearer $VIDEXO_API_KEY.

Body AiUpscaleRequest

Body fields
NameTypeDescription
input requiredstring or objectAn http or https URL, videxo://uploads/<upload_id>, { "url" } or { "upload_id" }.
resolution requiredone of 1080p, 1440p, 4kThe target: 1080p, 1440p or 4k. The input must be smaller.
frame_rate one of source, smoothsource (default) keeps the input's rate, at most 60 fps; smooth doubles a rate of 30 fps or less.
trim objectThe part of the input to process, in seconds.
audio one of keep, removekeep (default) puts the source's own sound back in sync; remove leaves the output silent.
filename stringThe stored file name; .mp4 only.
webhook_url string, URL, up to 2,048 characters or nullAn https URL that gets the job when it ends (M4).
metadata map of string to string, up to 500 charactersYour own string pairs, returned with the job and its webhook: at most 20 keys of up to 40 characters, values up to 500.

Request

bash
curl "$VIDEXO_API_URL/v1/ai-upscale/estimate" \
  -H "Authorization: Bearer $VIDEXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": "https://videxo.io/samples/talk.mp4",
  "resolution": "1080p",
  "trim": {
    "start": 0,
    "duration": 8
  }
}'

Response

200 JSON
{
  "operation": "ai_upscale",
  "max_seconds": 8,
  "credits_base": 75,
  "credits_per_second": 64,
  "credits_max": 587,
  "expected_wait_seconds": {
    "low": 146,
    "high": 446
  },
  "frame_rate_bands": {
    "up_to_30_fps": {
      "credits_per_second": 32,
      "credits_max": 331,
      "expected_wait_seconds": {
        "low": 73,
        "high": 373
      }
    },
    "above_30_fps": {
      "credits_per_second": 64,
      "credits_max": 587,
      "expected_wait_seconds": {
        "low": 146,
        "high": 446
      }
    }
  }
}

Responses

Responses
StatusBodyWhen
200AiUpscaleEstimateWhat the job would reserve, and its expected wait.
400Probleminvalid_request (with errors)
401Problemauthentication_failed (missing_api_key, invalid_api_key, api_key_revoked, api_key_expired)
403Problempermission_denied (token_scope): a client token cannot call this route; permission_denied (key_scope): a scoped API key without jobs:run
413Problemlimit_exceeded: request_body_size (the body is larger than 512 KB), media_resolution (the plan does not offer the target) or media_duration (trim.duration is longer than the plan allows)
415Probleminvalid_request (not_json): the body is not sent as application/json
429Problemrate_limited, with Retry-After in seconds
500Probleminternal_error
503Problemservice_unavailable (temporary)