Siren Motion TransferEstimate price

Siren Motion Transfer

Siren Motion Transfer estimate API

Price a Siren Motion Transfer video from its resolution and source length. Estimates are free.

Siren Motion Transfer
POSThttps://serastudio.app/api/v1/siren/estimate

Usage notes

  • An estimate creates nothing and costs nothing.
  • The key needs the read permission. Keys created in the console have it.
  • max_usd is what a generation with the same resolution and length holds from your balance.
  • usd_per_second is the price your workspace pays: the list price minus your current discount (discount_pct). See Pricing.
  • A source must be 1 to 15 seconds long. A shorter one returns source_too_short, and a longer one returns source_too_long.
  • The length is rounded up to a whole second. A source shorter than 4 seconds counts as 4 seconds.
  • Leave out source_duration_s to price the longest source this mode accepts, 15 seconds.
  • The endpoint ignores fields it does not know.

Quick start

curl https://serastudio.app/api/v1/siren/estimate \
  -H "Authorization: Bearer $SERA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"resolution": "720p", "source_duration_s": 9.4}'

Input schema

resolutionstringdefault: "480p"

Output resolution to price. Allowed values: "480p", "720p", "1080p". Leave it out, or send null, to price at "480p".

source_duration_snumber

Length of the source video in seconds, from 1 to 15. Leave it out, or send null, to price 15 seconds.

Complete JSON schema
{
  "type": "object",
  "title": "EstimateRequest",
  "properties": {
    "resolution": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "480p",
        "720p",
        "1080p",
        null
      ],
      "default": "480p"
    },
    "source_duration_s": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 1,
      "maximum": 15
    }
  },
  "additionalProperties": true
}

Response

A successful request returns 200 with the estimate:

{
  "model": "siren",
  "currency": "usd",
  "resolution": "720p",
  "usd_per_second": 0.175,
  "list_usd_per_second": 0.175,
  "discount_pct": 0,
  "billable_seconds": 20,
  "source_seconds_billed": 10,
  "max_usd": 3.5,
  "min_source_seconds_billed": 4,
  "max_source_seconds": 15,
  "note": "Billable seconds = output duration + input video duration. A generation holds max_usd from your balance, then charges the finished length and restores the rest."
}
modelstring

The mode, siren.

currencystring

Always usd.

resolutionstring

The resolution that was priced.

usd_per_secondnumber

Price per billable second your workspace pays at that resolution, after discount_pct.

list_usd_per_secondnumber

List price per billable second at that resolution.

discount_pctnumber

Your workspace's current discount, from funds added in the last 28 days. 0 when none.

billable_secondsnumber

source_seconds_billed times 2.

source_seconds_billednumber

Source seconds counted: the length rounded up and never less than 4, or 15 when you leave the length out.

max_usdnumber

billable_seconds times usd_per_second, rounded to the cent. The hold a generation takes.

min_source_seconds_billednumber

The minimum value of source_seconds_billed: 4.

max_source_secondsnumber

The longest source this mode accepts: 15.

notestring

A short explanation of billable_seconds and max_usd.

Errors

StatusCodeWhen it happensRetry
400invalid_jsonThe body is not a JSON object. An empty body is read as {}.No
401api_key_missingNo Bearer key was sent in the Authorization header.No
401api_key_invalidThe key is malformed or unknown.No
401api_key_revokedThe key was deleted in the console.No
401api_key_disabledThe key is disabled in the console.No
401api_key_expiredThe key is past its expiration date.No
403insufficient_scopeThe key lacks the read permission. Keys created in the console have it.No
403workspace_forbiddenThe account that owns the workspace is suspended or scheduled for deletion.No
422invalid_parameterA field has the wrong type or value. error.param names the field.No
422source_too_shortsource_duration_s is more than 0 but under 1 second.No
422source_too_longsource_duration_s is over 15 seconds.No
503temporarily_unavailableThe request could not be completed just now.Yes
500internal_errorSomething failed on our side. The request_id identifies the request.Yes
503api_unavailableThe API is turned off.No

A source longer than 15 seconds, for example, returns 422:

{
  "error": {
    "type": "invalid_request",
    "code": "source_too_long",
    "message": "The source is 16 s; Siren accepts up to 15 s.",
    "fix": "Trim the source to 15 s or less.",
    "param": "source_duration_s",
    "charged": false,
    "retryable": false
  },
  "request_id": "req_k38ss8hmb36g9308sy351ot3yi"
}

See Errors and retries for the error body and when to retry.