Retrieve a Template
Returns a Template by its ID or name.
https://api2.transloadit.com/ templates/ {templateIdOrName}Set TEMPLATE_ID_OR_NAME to a Workspace Template’s ID or name.
For a Builtin Template, keep the literal / and @ separators in its identifier.
Use one of these assignments before running the request example below:
TEMPLATE_ID_OR_NAME='builtin/encode-hls-video@0.0.1'selects that specific version.TEMPLATE_ID_OR_NAME='builtin/encode-hls-video@latest'selects the latest version.TEMPLATE_ID_OR_NAME='builtin/encode-hls-video'also selects the latest version.
Do not encode these separators as %2F or %40. The canonical path constraint below applies to Workspace Templates;
Builtin Templates use the additional slash-bearing path shown here. Discover their versioned IDs
with include_builtin on List Templates.
Request example
Set TEMPLATE_ID_OR_NAME to your resource value without percent-encoding it.
Canceled Workspaces cannot create new bearer tokens. This endpoint remains available with an existing active Auth Key: use the signed read recipe instead of the token setup below. The key must grant this endpoint’s required scopes.
Run this request in a server-side shell with curl and a suitable bearer token in TRANSLOADIT_TOKEN. If you need a token, expand the setup below.
Need a bearer token?
In a trusted server-side shell with curl and jq, set TRANSLOADIT_KEY and TRANSLOADIT_SECRET to your Auth Key and Auth Secret. Keep both credentials and the resulting token secret; never run this setup in browser code.
First, create a token with this endpoint’s required scopes. Your Auth Key must already grant those scopes.
if ! TOKEN_RESPONSE="$(curl --fail-with-body -sS \
--request POST \
--url 'https://api2.transloadit.com/token' \
--user "${TRANSLOADIT_KEY:?Set TRANSLOADIT_KEY}:${TRANSLOADIT_SECRET:?Set TRANSLOADIT_SECRET}" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'aud=api2' \
--data-urlencode 'scope=templates:read')"; then
printf '%s\n' "$TOKEN_RESPONSE" >&2
exit 1
fi
TRANSLOADIT_TOKEN="$(printf '%s' "$TOKEN_RESPONSE" |
jq -er '.access_token | strings | select(length > 0)')" || exit 1
Keep this shell open and run the request below. Reuse the token while it remains valid.
curl --fail-with-body -sS --request GET --get \
--url "https://api2.transloadit.com/templates/${TEMPLATE_ID_OR_NAME:?Set TEMPLATE_ID_OR_NAME}" \
--header "Authorization: Bearer ${TRANSLOADIT_TOKEN:?Set TRANSLOADIT_TOKEN}" \
--data-urlencode 'params={}'
Authentication
This endpoint accepts signed params or a bearer token. See Authentication for setup instructions.
Required scope for the Auth Key or bearer token: templates:read.
Signed requests require both a signature and a future params.auth.expires timestamp. Bearer tokens do not require either.
Path parameters
templateIdOrName(path segment), required. pattern:^[a-z0-9-]+$, minimum length: 1
Query parameters
params(JSON string). A JSON-encoded object whose supported keys are listed below.signature(string). Required for signed requests. Omit this field when using a bearer token.
Supported keys inside the signed params field
Authentication fields in this list apply to signed requests. With a bearer token, you can omit params.auth and the separate signature field. Compare the authentication-specific request parameters below.
Complete JSON Schema
params: Only the fields listed for this object are accepted.
| Field | Type and description |
|---|---|
params.required for signed requests; optional with a bearer token | Contains the Transloadit API key and signature-authentication metadata for a Template request.
|
params.required | stringISO 8601 expiration timestamp in the future. Required when a request is signed or requires signature authentication; bearer-authenticated requests may omit it. |
params.required | stringTransloadit API key used to authenticate requests |
params. | string | integerUnique, random value included in signed request params to make each signature unique and prevent accidental signature reuse. |
Request parameters by authentication method
With signed params
Include your Auth Key as params.auth.key. When signing the request, include a future params.auth.expires timestamp and send the signature in the separate signature field. The field definitions below use paths inside params.
Complete JSON Schema
params: Only the fields listed for this object are accepted.
Uses the field definitions above: params.auth, params.nonce
With a bearer token
Send the bearer token in the Authorization header. You can omit params.auth and the separate signature field. Other required parameters still apply. The field definitions below use paths inside params.
Complete JSON Schema
params: Only the fields listed for this object are accepted.
Uses the field definitions above: params.nonce
| Field | Type and description |
|---|---|
params. | Contains the Transloadit API key and signature-authentication metadata for a Template request.
|
params. | stringISO 8601 expiration timestamp in the future. Required when a request is signed or requires signature authentication; bearer-authenticated requests may omit it. |
params. | stringTransloadit API key used to authenticate requests |
Response
Here’s an example response body:
{
"assembly_status_expiry": null,
"content": {
"steps": {
"resize": {
"robot": "/image/resize",
"use": ":original",
"width": 320
}
}
},
"id": "8fc3b9166c784afd824acf24269ebd11",
"message": "Your Template was successfully found.",
"name": "resize-images",
"ok": "TEMPLATE_FOUND",
"require_signature_auth": 0,
"transcoding_result_expiry": null
}2xx success
JSON response body. application/json text/plain; charset=utf-8
Response body schema
Complete JSON Schema
The response contains only the fields listed for this object.
| Field | Type and description |
|---|---|
assembly_status_expiryrequired | null | string |
contentrequired | object | Array<any value> | string | number | boolean | nullAny of the following schemas may apply: objectobjectAdditional property schemaany valueArray<any value>Array<any value>Array item schemaany valuestringstringnumbernumberbooleanbooleannullnull |
idrequired | stringAny of the following schemas may apply: Variant 1: string (maximum length: 32)stringValidation pattern (regular expression)^[\x00-\x7F]*$Variant 2: string (maximum length: 32)stringValidation pattern (regular expression)^builtin\/[a-z0-9-]+(?:@[0-9a-z.-]+)?$ |
messagerequired | string (minimum length: 1) |
namerequired | string (minimum length: 1, maximum length: 255) |
okrequired | string (always: "TEMPLATE_FOUND") |
require_signature_authrequired | 0 | 1 |
transcoding_result_expiryrequired | null | string |
Error response
JSON response body. application/json text/plain; charset=utf-8
Response body schema
Complete JSON Schema
The response may contain additional fields.
| Field | Type and description |
|---|---|
assembly_id | string |
error | string (minimum length: 1) |
http_code | number | string
|
message | stringHuman-readable explanation of the error. Its wording can vary; use the |
reason | null | string | number | boolean | Array<any value> | objectAny of the following schemas may apply: nullnullstringstringnumbernumberbooleanbooleanArray<any value>Array<any value>Array item schemaany valueobjectobjectAdditional property schemaany value |
HTTP 400
JSON response body. application/json text/plain; charset=utf-8
Response body schema
Complete JSON Schema
Named errors and the general error format
error: "SIGNATURE_REUSE_DETECTED"
The request was denied for security reasons. If you think this is in error, please get in touch with support.
The response may contain additional fields.