Custom Templates API

November 27, 2026

Custom Templates API

Save a set of editing settings as a template, then pass custom_template_id on AI Clipping or Clips Export to apply the whole set at once.

A template can include aspect ratio and layout, caption style, emoji, B-roll, AI Hook, speech enhancement, filler-word removal, silence removal, intro, outro, and logo.

Templates are the same records as My Template on the website. A template created on the website can be listed here, and a template created here appears on the website.

Plan Limits

PlanSaved templates
FreeNot available
Starter1
Pro3
Scale10. Purchasing 2 or more raises the limit to 20.

Uploading a logo, intro, or outro also requires a paid plan and uses storage quota. See Subscription Plans.

Workflow

  1. Upload assets only when the template needs a logo, intro, or outro. Caption, ratio, and the other settings do not need an upload.
  2. Create a template. The platform places the logo, intro, and outro from the position you choose. Do not send coordinates.
  3. List or get templates when you need the current configuration.
  4. Apply the template by passing custom_template_id to POST /api/v2/clips or POST /api/v2/clips/export.
  5. Update replaces the whole template. A capability omitted from the request is removed. Read the current template first, edit that copy, and submit the full configuration.
  6. Delete a template you no longer need.

Endpoints

MethodPathDescription
POST/api/v2/upload/single-fileRequest an upload URL for a logo, intro, or outro
POST/api/v2/upload/statusPoll until the uploaded file is ready
POST/api/v2/custom-templatesCreate a template
GET/api/v2/custom-templatesList templates
GET/api/v2/custom-templates/{id}Get one template
PUT/api/v2/custom-templates/{id}Replace a template
DELETE/api/v2/custom-templates/{id}Delete a template

All requests require:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
x-wayinvideo-api-version: v2

GET and DELETE do not need Content-Type.


Upload a Logo, Intro, or Outro

Request a pre-signed URL, PUT the file to that URL, then poll until status is DONE. Use the returned identity as resource.identify in the template.

Skip this step when the template does not use a logo, intro, or outro. General video uploads are documented in the Upload API.

POST https://wayinvideo-api.wayin.ai/api/v2/upload/single-file

Request Body

ParameterTypeRequiredDescription
namestringYesFile name with an extension. The extension is used to check the format.
sizeintegerNoFile size in bytes. Send it so the API can check the size limit and storage quota.
resource_typestringYes for template assetsHow the file will be used. See the table below. If omitted, the file is treated as a normal video and cannot be used in a template.
resource_typeUsed byFormatsSize limitDuration limit
BRAND_KIT_LOGOlogo.jpg, .jpeg, .png, .webp10 MB—
BRAND_KIT_VIDEOintro, outro.mp4, .mov, .webm, .avi5 GB60 minutes

Example Request

curl -X POST https://wayinvideo-api.wayin.ai/api/v2/upload/single-file \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2" \
  -d '{
    "name": "brand-logo.png",
    "size": 204800,
    "resource_type": "BRAND_KIT_LOGO"
  }'

Response

{
  "data": {
    "upload_url": "https://storage.example.com/upload/presigned-url...",
    "identity": "EF_up_06wguq1afbwg1"
  }
}
FieldTypeDescription
upload_urlstringPre-signed upload URL. It expires, so upload soon after you receive it.
identitystringFile id. Put this value in resource.identify when you create or update a template.

Upload the File

curl -X PUT "https://storage.example.com/upload/presigned-url..." \
  --upload-file ./brand-logo.png

HTTP 200 means the file has been received. The platform then processes it. Poll the status endpoint until processing finishes.

Check Upload Status

Poll every 3 to 5 seconds until status is DONE or ERROR. Only a file with status DONE can be used in a template.

POST https://wayinvideo-api.wayin.ai/api/v2/upload/status
ParameterTypeRequiredDescription
identifystringYesThe identity returned by the upload URL request.
curl -X POST https://wayinvideo-api.wayin.ai/api/v2/upload/status \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2" \
  -d '{
    "identify": "EF_up_06wguq1afbwg1"
  }'
{
  "data": {
    "status": "DONE",
    "file_name": "brand-logo.png",
    "url": "https://cdn.example.com/user/brand-logo.png"
  }
}
FieldTypeDescription
statusstringSTART: the file has not arrived. Confirm the PUT succeeded. UPLOADED: the file arrived and is still processing. DONE: ready to use. ERROR: processing failed. Upload the file again.
file_namestringFile name.
urlstringFile URL.

Create a Template

POST https://wayinvideo-api.wayin.ai/api/v2/custom-templates

Request Body

ParameterTypeRequiredDescription
namestringYesTemplate name. Must not be empty.
configobjectYesCapabilities to store. Each key is one capability. See Config fields. {} is allowed. null is not. reframe is required when you send any other capability.

A capability present in config overrides the matching parameter on AI Clipping when the template is applied. A capability omitted from config keeps the value from that clipping or export request.

Example Request

curl -X POST https://wayinvideo-api.wayin.ai/api/v2/custom-templates \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2" \
  -d '{
    "name": "Brand A - Shorts",
    "config": {
      "reframe": {
        "ratio": "RATIO_9_16",
        "layout_type": "Fit",
        "auto_reframe": true
      },
      "caption_style": {
        "mode": "on",
        "template_id": "word-focus"
      },
      "emoji": { "operation": "add" },
      "broll": {
        "operation": "add",
        "resource_type": "RESOURCE_VIDEO_STOCK_BROLL"
      },
      "ai_hook": {
        "operation": "add",
        "template_id": "preset-1",
        "script_style": "casual",
        "position": "beginning"
      },
      "speech_enhance": { "operation": "clean" },
      "remove_filter": { "operation": "remove" },
      "remove_silence": {
        "operation": "remove",
        "silence_duration_ms": 500
      },
      "intro": {
        "operation": "add",
        "resource": { "identify": "EF_up_06wgintro0001" }
      },
      "outro": {
        "operation": "add",
        "resource": { "identify": "EF_up_06wgoutro0001" }
      },
      "logo": {
        "operation": "add",
        "items": [
          {
            "resource": { "identify": "EF_up_06wguq1afbwg1" },
            "position": "top_right"
          }
        ]
      }
    }
  }'

Response

The response is the saved template. The shape matches Get a Template.

{
  "data": {
    "id": "uctmpl06yf2m0m1b0pv",
    "name": "Brand A - Shorts",
    "config": {
      "reframe": {
        "ratio": "RATIO_9_16",
        "layout_type": "Fit",
        "auto_reframe": true
      }
    },
    "created": 1764057600000,
    "last_modified": 1764057600000
  }
}

List Templates

Returns every template in the current account or workspace, newest first. data is [] when there are no templates.

GET https://wayinvideo-api.wayin.ai/api/v2/custom-templates

Example Request

curl -X GET https://wayinvideo-api.wayin.ai/api/v2/custom-templates \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2"

Example Response

{
  "data": [
    {
      "id": "uctmpl06yf2m0m1b0pv",
      "name": "Brand A - Shorts",
      "config": {
        "reframe": {
          "ratio": "RATIO_9_16",
          "layout_type": "Fit",
          "auto_reframe": true
        }
      },
      "created": 1764057600000,
      "last_modified": 1764144000000
    }
  ]
}
FieldTypeDescription
idstringTemplate id. It starts with uctmpl.
namestringTemplate name.
configobjectStored configuration. See Get a Template.
createdintegerCreated time, Unix timestamp in milliseconds.
last_modifiedintegerLast modified time, Unix timestamp in milliseconds.

Get a Template

GET https://wayinvideo-api.wayin.ai/api/v2/custom-templates/{id}

Path Parameters

ParameterTypeRequiredDescription
idstringYesTemplate id returned by create or list.

Example Request

curl -X GET https://wayinvideo-api.wayin.ai/api/v2/custom-templates/uctmpl06yf2m0m1b0pv \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2"

Example Response

{
  "data": {
    "id": "uctmpl06yf2m0m1b0pv",
    "name": "Brand A - Shorts",
    "config": {
      "reframe": {
        "ratio": "RATIO_9_16",
        "layout_type": "Fit",
        "auto_reframe": true
      },
      "caption_style": {
        "mode": "on",
        "template_id": "word-focus"
      },
      "intro": {
        "operation": "add",
        "resource": {
          "identify": "EF_up_06wgintro0001",
          "url": "https://cdn.example.com/user/intro.mp4",
          "name": "intro"
        }
      },
      "logo": {
        "operation": "add",
        "items": [
          {
            "resource": {
              "identify": "EF_up_06wguq1afbwg1",
              "url": "https://cdn.example.com/user/brand-logo.png",
              "name": "brand-logo"
            },
            "position": "top_right"
          }
        ]
      }
    },
    "created": 1764057600000,
    "last_modified": 1764144000000
  }
}
FieldTypeDescription
idstringTemplate id.
namestringTemplate name.
configobjectTemplate configuration. Besides the fields in this page, config may include internal fields such as transform, operation, and extra. You can send those fields back unchanged on update. A returned transform is reused. If a logo item also includes position, that item's transform is discarded and the placement is generated again from position. Asset objects may include url and name. The platform reads identify only.
createdintegerCreated time, Unix timestamp in milliseconds.
last_modifiedintegerLast modified time, Unix timestamp in milliseconds.

A logo placed by dragging it on the website has no position. That item only has transform. Sending it back unchanged keeps the placement. Adding position places it again at the new position.


Update a Template

Replaces name and config for the whole template. A capability omitted from config is removed. It is not a partial patch. Logo, intro, and outro placement is calculated again from the new configuration.

Read the template with Get a Template, edit that object, and submit the full body.

PUT https://wayinvideo-api.wayin.ai/api/v2/custom-templates/{id}

The body matches Create a Template. name and config are both required.

Example Request

This example keeps reframe, captions, and the logo, and moves the logo to the bottom right. An intro that was stored before is removed because it is not in this body.

curl -X PUT https://wayinvideo-api.wayin.ai/api/v2/custom-templates/uctmpl06yf2m0m1b0pv \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2" \
  -d '{
    "name": "Brand A - Shorts v2",
    "config": {
      "reframe": {
        "ratio": "RATIO_9_16",
        "layout_type": "Fit",
        "auto_reframe": true
      },
      "caption_style": {
        "mode": "on",
        "template_id": "word-focus"
      },
      "logo": {
        "operation": "add",
        "items": [
          {
            "resource": { "identify": "EF_up_06wguq1afbwg1" },
            "position": "bottom_right"
          }
        ]
      }
    }
  }'

Response

The updated template. The shape matches Get a Template.


Delete a Template

DELETE https://wayinvideo-api.wayin.ai/api/v2/custom-templates/{id}

Deletion cannot be undone. Later reads and applies with this id fail because the template does not exist. Clips already generated or exported with the template are unchanged. Files referenced by the template are not deleted.

Example Request

curl -X DELETE https://wayinvideo-api.wayin.ai/api/v2/custom-templates/uctmpl06yf2m0m1b0pv \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2"

Response

{
  "data": null
}

Apply a Template

Add custom_template_id to the JSON body.

On AI Clipping, custom_template_id is used only when enable_export is true. On Clips Export, the export request itself is a render, so the id applies whenever you send it.

{
  "video_url": "https://www.youtube.com/watch?v=example",
  "target_lang": "en",
  "enable_export": true,
  "custom_template_id": "uctmpl06yf2m0m1b0pv"
}
CaseResult
The template and the request both set the same capabilityThe template wins. For example, a template caption_style overrides cc_style_tpl on the request.
The request sets a capability the template does not includeThe request value is used.
The template sets a capability the request does not includeThe template value is used.

The template is read when the task is submitted. Later edits or deletion do not change a task that was already submitted.


Config Fields

Each key is one capability. Omit a capability you do not want to store. reframe is required.

reframe

FieldTypeRequiredDescription
ratiostringYesRATIO_16_9, RATIO_1_1, RATIO_4_5, RATIO_9_16.
layout_typestringYesLayout. Allowed values depend on ratio. Pass the names exactly, including spaces.
auto_reframebooleanNoTurn on AI subject tracking.
ratioAllowed layout_type values
RATIO_16_9Auto, Full, Fit, Grid 4, Split 2, Trio, PiP, OTS, Screen First
RATIO_9_16Auto, Full, Fit, Grid 4, Split 2, Trio, PiP, Screen First, Gameplay A, Gameplay B
RATIO_4_5Auto, Full, Fit, Grid 4, Split 2, Trio, PiP, Screen First, Gameplay A, Gameplay B
RATIO_1_1Auto, Full, Fit, Grid 4, Trio

caption_style

FieldTypeRequiredDescription
modestringYeson shows captions. off hides captions. inherit leaves captions to the clipping or export request.
template_idstringYes when mode is onSystem template id. See Subtitle Styles.

emoji

FieldTypeRequiredDescription
operationstringYesadd inserts emoji automatically. remove does not add emoji.

broll

FieldTypeRequiredDescription
operationstringYesadd inserts B-roll. remove does not add B-roll, and removes existing B-roll on export.
resource_typestringNoRESOURCE_VIDEO_AI_BROLL generates B-roll. RESOURCE_VIDEO_STOCK_BROLL uses the stock library.

ai_hook

FieldTypeRequiredDescription
operationstringYesadd inserts an AI Hook. remove does not add one, and removes an existing hook on export. Other fields are not needed when this is remove.
template_idstringYes when operation is addSystem template id. See Hook Text Styles.
script_stylestringNoCopy style. Default serious. Allowed values: serious, casual, informative, conversational, humorous, parody, inspirational, dramatic, empathetic, persuasive, neutral, excited, calm.
positionstringNobeginning or end. Default beginning.
keywordsstringNoKeywords the hook should follow.
text_durationintegerNoHow long the hook text stays on screen, in milliseconds.

speech_enhance

FieldTypeRequiredDescription
operationstringYesclean turns on speech enhancement and noise reduction. restore keeps the original audio.

remove_filter

FieldTypeRequiredDescription
operationstringYesremove cuts filler words such as "um" and "uh". restore keeps them.

remove_silence

FieldTypeRequiredDescription
operationstringYesremove cuts silent stretches. restore keeps them.
silence_duration_msintegerNoMinimum silence to cut, in milliseconds. Default 500.

intro and outro

Both objects use the same fields. An intro is placed at the start of each clip. An outro is placed at the end. The asset is fitted to the template aspect ratio.

FieldTypeRequiredDescription
operationstringYesadd inserts the asset. remove strips an existing intro or outro when the template is applied. Other fields are not needed when this is remove.
resource.identifystringYes when operation is addidentity from the upload step. The upload resource_type must be BRAND_KIT_VIDEO.
FieldTypeRequiredDescription
operationstringYesadd inserts logos. remove strips existing logos when the template is applied. items is not needed when this is remove.
itemsarrayYes when operation is addLogo list. At least one item.
items[].resource.identifystringYes when operation is addidentity from the upload step. The upload resource_type must be BRAND_KIT_LOGO.
items[].positionstringYestop_left, top_right, center, bottom_left, bottom_right. On update, you can omit position when you send back the transform from the template detail. That keeps the previous placement. Sending position places the logo again.

Logo size and margin use platform defaults.