List gallery templates
Lists all templates available in the public Template Gallery.
Gallery templates are professionally designed templates that you can use as a starting point for your projects**.**
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | - | Filter templates by name or description |
category | string | - | Filter templates by category name |
tags | string | - | Filter templates by tags (comma-separated) |
page | integer | 0 | Page number for pagination |
limit | integer | 25 | Number of results per page |
width | integer | - | Filter templates by exact width |
height | integer | - | Filter templates by exact height |
includeLayers | boolean | false | Include template layers in response |
Response
Section titled “Response”Returns an array of template objects. Each template includes the following notable fields:
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier of the template |
name | string | Name of the template |
description | string | Description of the template |
width | integer | Width of the template in pixels |
height | integer | Height of the template in pixels |
thumbnail | string | URL of the template thumbnail image |
category | object | Category information (name, description) |
tags | array | List of tags associated with the template |
background | string | The background color of the template |
layers | array | List of template layers (only when includeLayers=true) |
Sample Request
Section titled “Sample Request”Here’s a sample request to list all gallery templates:
GET /v1/templates/galleryfetch('https://api.templated.io/v1/templates/gallery', { method: 'GET', headers: { 'Authorization': `Bearer ${API_KEY}` }}).then(response => response.json()).then(data => console.log(data)).catch(error => console.error('Error:', error));import requests
api_key = 'API_KEY'url = 'https://api.templated.io/v1/templates/gallery'
headers = {'Authorization': f'Bearer {api_key}'}
response = requests.get(url, headers=headers)
if response.status_code == 200: print(response.json())else: print('Request failed. Response code:', response.status_code) print(response.text)<?php$apiKey = 'API_KEY';$url = "https://api.templated.io/v1/templates/gallery";
$options = [ 'http' => [ 'header' => "Authorization: Bearer {$apiKey}\r\n", 'method' => 'GET' ]];
$context = stream_context_create($options);$result = file_get_contents($url, false, $context);
if ($result === FALSE) { echo "Error fetching data";} else { $data = json_decode($result, true); print_r($data);}?>Filtering Examples
Section titled “Filtering Examples”Filter by Category
Section titled “Filter by Category”fetch('https://api.templated.io/v1/templates/gallery?category=Certificate', { method: 'GET', headers: { 'Authorization': `Bearer ${API_KEY}` }})Filter by Dimensions
Section titled “Filter by Dimensions”// Get Instagram post templates (1080x1080)fetch('https://api.templated.io/v1/templates/gallery?width=1080&height=1080', { method: 'GET', headers: { 'Authorization': `Bearer ${API_KEY}` }})Search by Name
Section titled “Search by Name”fetch('https://api.templated.io/v1/templates/gallery?query=certificate', { method: 'GET', headers: { 'Authorization': `Bearer ${API_KEY}` }})Opening a Gallery Template in the Editor
Section titled “Opening a Gallery Template in the Editor”You can launch the Templated editor with a gallery template pre-loaded using the gallery URL parameter:
https://app.templated.io/editor?gallery={galleryTemplateId}This will automatically create a copy of the gallery template in the user’s account and open it for editing.
For embedded editor integrations, you can use:
https://app.templated.io/editor?embed={embedConfigId}&gallery={galleryTemplateId}