Get detailed resource information by ID
curl --request GET \
--url https://api.magnific.com/v1/resources/{resource-id} \
--header 'x-magnific-api-key: <api-key>'import requests
url = "https://api.magnific.com/v1/resources/{resource-id}"
headers = {"x-magnific-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-magnific-api-key': '<api-key>'}};
fetch('https://api.magnific.com/v1/resources/{resource-id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.magnific.com/v1/resources/{resource-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-magnific-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.magnific.com/v1/resources/{resource-id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-magnific-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.magnific.com/v1/resources/{resource-id}")
.header("x-magnific-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.magnific.com/v1/resources/{resource-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-magnific-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 770012,
"name": "Abstract of white lines background generative ai",
"slug": "abstract-white-lines-background-generative-ai",
"type": "photo",
"vertical": "photo",
"is_ai_generated": false,
"premium": true,
"new": true,
"url": "https://www.freepik.com/premium-photo/abstract-white-lines-background-generative-ai_39178780.htm",
"preview": {
"url": "https://www.freepik.com/premium-photo/abstract-white-lines-background-generative-ai_39178780.htm",
"width": 300,
"height": 200
},
"has_prompt": false,
"author": {
"id": 744082,
"name": "flaticon",
"avatar": "https://avatar.cdnpk.net/744082.jpg",
"slug": "flaticon",
"assets": 100
},
"license": "https://www.freepik.com/profile/license/pdf/4350594",
"created": "2020-01-01T00:00:00.000Z",
"dimensions": {
"width": 1000,
"height": 1000
},
"download_size": 1024,
"available_formats": {
"jpg": {
"total": 1,
"items": [
{
"size": 100
}
]
}
},
"related_resources": {
"suggested": [
{
"id": 770011,
"name": "Sports bike",
"slug": "sports-bike",
"type": "vector",
"is_ai_generated": true,
"premium": false,
"new": true,
"url": "https://www.freepik.com/free-vector/sports-bike_770011.htm",
"preview": {
"url": "https://www.freepik.com/free-vector/sports-bike_770011.jpg",
"width": 300,
"height": 200
},
"has_prompt": true,
"author": {
"id": 744082,
"name": "flaticon",
"avatar": "https://avatar.cdnpk.net/744082.jpg",
"slug": "flaticon",
"assets": 100
}
}
],
"same_author": [
{
"id": 770011,
"name": "Sports bike",
"slug": "sports-bike",
"type": "vector",
"is_ai_generated": true,
"premium": false,
"new": true,
"url": "https://www.freepik.com/free-vector/sports-bike_770011.htm",
"preview": {
"url": "https://www.freepik.com/free-vector/sports-bike_770011.jpg",
"width": 300,
"height": 200
},
"has_prompt": true,
"author": {
"id": 744082,
"name": "flaticon",
"avatar": "https://avatar.cdnpk.net/744082.jpg",
"slug": "flaticon",
"assets": 100
}
}
],
"same_collection": {
"url": "https://www.freepik.com/collection/shining/2552",
"items": [
{
"id": 770011,
"name": "Sports bike",
"slug": "sports-bike",
"type": "vector",
"is_ai_generated": true,
"premium": false,
"new": true,
"url": "https://www.freepik.com/free-vector/sports-bike_770011.htm",
"preview": {
"url": "https://www.freepik.com/free-vector/sports-bike_770011.jpg",
"width": 300,
"height": 200
},
"has_prompt": true,
"author": {
"id": 744082,
"name": "flaticon",
"avatar": "https://avatar.cdnpk.net/744082.jpg",
"slug": "flaticon",
"assets": 100
}
}
]
},
"same_series": {
"url": "https://www.freepik.com/serie/32689488",
"items": [
{
"id": 770011,
"name": "Sports bike",
"slug": "sports-bike",
"type": "vector",
"is_ai_generated": true,
"premium": false,
"new": true,
"url": "https://www.freepik.com/free-vector/sports-bike_770011.htm",
"preview": {
"url": "https://www.freepik.com/free-vector/sports-bike_770011.jpg",
"width": 300,
"height": 200
},
"has_prompt": true,
"author": {
"id": 744082,
"name": "flaticon",
"avatar": "https://avatar.cdnpk.net/744082.jpg",
"slug": "flaticon",
"assets": 100
}
}
]
}
},
"related_tags": [
{
"name": "coloring pages",
"slug": "coloring-pages",
"url": "https://www.freepik.com/free-photos-vectors/coloring-pages"
},
{
"slug": "kawaii-coloring-page",
"name": "kawaii coloring page"
},
{
"slug": "cute-kawaii",
"name": "cute kawaii"
},
{
"slug": "adorable",
"name": "adorable"
},
{
"slug": "chibi",
"name": "chibi"
},
{
"slug": "line-art",
"name": "line art"
}
]
}
}Images and templates API
Get detailed resource information by ID
Retrieve the detailed information of a specific resource by its ID. This endpoint supports multiple resource types including PSD, vector, photo, and AI-generated content.
GET
/
v1
/
resources
/
{resource-id}
Get detailed resource information by ID
curl --request GET \
--url https://api.magnific.com/v1/resources/{resource-id} \
--header 'x-magnific-api-key: <api-key>'import requests
url = "https://api.magnific.com/v1/resources/{resource-id}"
headers = {"x-magnific-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-magnific-api-key': '<api-key>'}};
fetch('https://api.magnific.com/v1/resources/{resource-id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.magnific.com/v1/resources/{resource-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-magnific-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.magnific.com/v1/resources/{resource-id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-magnific-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.magnific.com/v1/resources/{resource-id}")
.header("x-magnific-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.magnific.com/v1/resources/{resource-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-magnific-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 770012,
"name": "Abstract of white lines background generative ai",
"slug": "abstract-white-lines-background-generative-ai",
"type": "photo",
"vertical": "photo",
"is_ai_generated": false,
"premium": true,
"new": true,
"url": "https://www.freepik.com/premium-photo/abstract-white-lines-background-generative-ai_39178780.htm",
"preview": {
"url": "https://www.freepik.com/premium-photo/abstract-white-lines-background-generative-ai_39178780.htm",
"width": 300,
"height": 200
},
"has_prompt": false,
"author": {
"id": 744082,
"name": "flaticon",
"avatar": "https://avatar.cdnpk.net/744082.jpg",
"slug": "flaticon",
"assets": 100
},
"license": "https://www.freepik.com/profile/license/pdf/4350594",
"created": "2020-01-01T00:00:00.000Z",
"dimensions": {
"width": 1000,
"height": 1000
},
"download_size": 1024,
"available_formats": {
"jpg": {
"total": 1,
"items": [
{
"size": 100
}
]
}
},
"related_resources": {
"suggested": [
{
"id": 770011,
"name": "Sports bike",
"slug": "sports-bike",
"type": "vector",
"is_ai_generated": true,
"premium": false,
"new": true,
"url": "https://www.freepik.com/free-vector/sports-bike_770011.htm",
"preview": {
"url": "https://www.freepik.com/free-vector/sports-bike_770011.jpg",
"width": 300,
"height": 200
},
"has_prompt": true,
"author": {
"id": 744082,
"name": "flaticon",
"avatar": "https://avatar.cdnpk.net/744082.jpg",
"slug": "flaticon",
"assets": 100
}
}
],
"same_author": [
{
"id": 770011,
"name": "Sports bike",
"slug": "sports-bike",
"type": "vector",
"is_ai_generated": true,
"premium": false,
"new": true,
"url": "https://www.freepik.com/free-vector/sports-bike_770011.htm",
"preview": {
"url": "https://www.freepik.com/free-vector/sports-bike_770011.jpg",
"width": 300,
"height": 200
},
"has_prompt": true,
"author": {
"id": 744082,
"name": "flaticon",
"avatar": "https://avatar.cdnpk.net/744082.jpg",
"slug": "flaticon",
"assets": 100
}
}
],
"same_collection": {
"url": "https://www.freepik.com/collection/shining/2552",
"items": [
{
"id": 770011,
"name": "Sports bike",
"slug": "sports-bike",
"type": "vector",
"is_ai_generated": true,
"premium": false,
"new": true,
"url": "https://www.freepik.com/free-vector/sports-bike_770011.htm",
"preview": {
"url": "https://www.freepik.com/free-vector/sports-bike_770011.jpg",
"width": 300,
"height": 200
},
"has_prompt": true,
"author": {
"id": 744082,
"name": "flaticon",
"avatar": "https://avatar.cdnpk.net/744082.jpg",
"slug": "flaticon",
"assets": 100
}
}
]
},
"same_series": {
"url": "https://www.freepik.com/serie/32689488",
"items": [
{
"id": 770011,
"name": "Sports bike",
"slug": "sports-bike",
"type": "vector",
"is_ai_generated": true,
"premium": false,
"new": true,
"url": "https://www.freepik.com/free-vector/sports-bike_770011.htm",
"preview": {
"url": "https://www.freepik.com/free-vector/sports-bike_770011.jpg",
"width": 300,
"height": 200
},
"has_prompt": true,
"author": {
"id": 744082,
"name": "flaticon",
"avatar": "https://avatar.cdnpk.net/744082.jpg",
"slug": "flaticon",
"assets": 100
}
}
]
}
},
"related_tags": [
{
"name": "coloring pages",
"slug": "coloring-pages",
"url": "https://www.freepik.com/free-photos-vectors/coloring-pages"
},
{
"slug": "kawaii-coloring-page",
"name": "kawaii coloring page"
},
{
"slug": "cute-kawaii",
"name": "cute kawaii"
},
{
"slug": "adorable",
"name": "adorable"
},
{
"slug": "chibi",
"name": "chibi"
},
{
"slug": "line-art",
"name": "line art"
}
]
}
}Authorizations
Your Magnific API key. Required for authentication. Learn how to obtain an API key
Headers
Specifies the search query language using the ISO 639-1 (2-letter language code) and the ISO 3166-1 (2-letter country code) for language variants. The API will use "en-US" as a default language for processing if a code is not provided, or does not exist.
Path Parameters
Photo, video or PSD resource ID
Response
OK Response
Vector details.
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Example:
{
"id": 15667327,
"name": "White t-shirt with copy space on gray background",
"slug": "merry-christmas",
"type": "photo",
"is_ai_generated": true,
"new": true,
"premium": true,
"url": "https://www.freepik.com/free-photo/white-t-shirts-with-copy-space-gray-background_15667327.htm",
"preview": {
"url": "https://www.freepik.com/free-ai-image/surreal-landscape_41357833.htm",
"width": 300,
"height": 500
},
"has_prompt": true,
"author": {
"id": 2147483647,
"name": "John Doe",
"avatar": "https://avatar.cdnpk.net/61668527-220726032514.jpg",
"assets": 0,
"slug": "merry-christmas"
},
"license": "https://www.freepik.com/profile/license/pdf/4350594",
"download_size": 1024,
"created": "2023-03-07T23:05:26.000Z",
"vertical": "mockup",
"available_formats": {
"psd": {
"total": 1,
"items": [
{ "name": "image.jpg", "colorspace": "RGB" },
{ "name": "image.jpg", "colorspace": "RGB" }
]
},
"ai": {
"total": 1,
"items": [
{ "name": "image.jpg", "colorspace": "RGB" },
{ "name": "image.jpg", "colorspace": "RGB" }
]
},
"eps": {
"total": 1,
"items": [
{ "name": "image.jpg", "colorspace": "RGB" },
{ "name": "image.jpg", "colorspace": "RGB" }
]
},
"atn": {
"total": 1,
"items": [
{ "name": "image.jpg", "colorspace": "RGB" },
{ "name": "image.jpg", "colorspace": "RGB" }
]
},
"fonts": {
"total": 1,
"items": [
{ "name": "image.jpg", "colorspace": "RGB" },
{ "name": "image.jpg", "colorspace": "RGB" }
]
},
"resources": {
"total": 1,
"items": [
{ "name": "image.jpg", "colorspace": "RGB" },
{ "name": "image.jpg", "colorspace": "RGB" }
]
},
"png": {
"total": 1,
"items": [
{ "name": "image.jpg", "colorspace": "RGB" },
{ "name": "image.jpg", "colorspace": "RGB" }
]
},
"jpg": {
"total": 1,
"items": [
{ "name": "image.jpg", "colorspace": "RGB" },
{ "name": "image.jpg", "colorspace": "RGB" }
]
},
"3d-render": {
"total": 1,
"items": [
{ "name": "image.jpg", "colorspace": "RGB" },
{ "name": "image.jpg", "colorspace": "RGB" }
]
},
"zip": {
"total": 1,
"items": [
{ "name": "image.jpg", "colorspace": "RGB" },
{ "name": "image.jpg", "colorspace": "RGB" }
]
},
"svg": {
"total": 1,
"items": [
{ "name": "image.jpg", "colorspace": "RGB" },
{ "name": "image.jpg", "colorspace": "RGB" }
]
}
},
"related_tags": [
{
"slug": "merry-christmas",
"name": "Merry Christmas",
"url": "https://www.freepik.com/dog"
},
{
"slug": "merry-christmas",
"name": "Merry Christmas",
"url": "https://www.freepik.com/dog"
}
],
"related_resources": {
"suggested": [
{
"id": 15667327,
"name": "White t-shirt with copy space on gray background",
"slug": "merry-christmas",
"type": "vector",
"is_ai_generated": true,
"new": true,
"premium": true,
"url": "https://www.freepik.com/free-photo/white-t-shirts-with-copy-space-gray-background_15667327.htm",
"preview": {
"url": "https://www.freepik.com/free-ai-image/surreal-landscape_41357833.htm",
"width": 300,
"height": 500
},
"has_prompt": true,
"author": {
"id": 2147483647,
"name": "John Doe",
"avatar": "https://avatar.cdnpk.net/61668527-220726032514.jpg",
"assets": 0,
"slug": "merry-christmas"
}
},
{
"id": 15667327,
"name": "White t-shirt with copy space on gray background",
"slug": "merry-christmas",
"type": "vector",
"is_ai_generated": true,
"new": true,
"premium": true,
"url": "https://www.freepik.com/free-photo/white-t-shirts-with-copy-space-gray-background_15667327.htm",
"preview": {
"url": "https://www.freepik.com/free-ai-image/surreal-landscape_41357833.htm",
"width": 300,
"height": 500
},
"has_prompt": true,
"author": {
"id": 2147483647,
"name": "John Doe",
"avatar": "https://avatar.cdnpk.net/61668527-220726032514.jpg",
"assets": 0,
"slug": "merry-christmas"
}
}
],
"same_author": [
{
"id": 15667327,
"name": "White t-shirt with copy space on gray background",
"slug": "merry-christmas",
"type": "vector",
"is_ai_generated": true,
"new": true,
"premium": true,
"url": "https://www.freepik.com/free-photo/white-t-shirts-with-copy-space-gray-background_15667327.htm",
"preview": {
"url": "https://www.freepik.com/free-ai-image/surreal-landscape_41357833.htm",
"width": 300,
"height": 500
},
"has_prompt": true,
"author": {
"id": 2147483647,
"name": "John Doe",
"avatar": "https://avatar.cdnpk.net/61668527-220726032514.jpg",
"assets": 0,
"slug": "merry-christmas"
}
},
{
"id": 15667327,
"name": "White t-shirt with copy space on gray background",
"slug": "merry-christmas",
"type": "vector",
"is_ai_generated": true,
"new": true,
"premium": true,
"url": "https://www.freepik.com/free-photo/white-t-shirts-with-copy-space-gray-background_15667327.htm",
"preview": {
"url": "https://www.freepik.com/free-ai-image/surreal-landscape_41357833.htm",
"width": 300,
"height": 500
},
"has_prompt": true,
"author": {
"id": 2147483647,
"name": "John Doe",
"avatar": "https://avatar.cdnpk.net/61668527-220726032514.jpg",
"assets": 0,
"slug": "merry-christmas"
}
}
],
"same_series": {
"url": "https://www.freepik.com/serie/32689488",
"items": [
{
"id": 15667327,
"name": "White t-shirt with copy space on gray background",
"slug": "merry-christmas",
"type": "vector",
"is_ai_generated": true,
"new": true,
"premium": true,
"url": "https://www.freepik.com/free-photo/white-t-shirts-with-copy-space-gray-background_15667327.htm",
"preview": {
"url": "https://www.freepik.com/free-ai-image/surreal-landscape_41357833.htm",
"width": 300,
"height": 500
},
"has_prompt": true,
"author": {
"id": 2147483647,
"name": "John Doe",
"avatar": "https://avatar.cdnpk.net/61668527-220726032514.jpg",
"assets": 0,
"slug": "merry-christmas"
}
},
{
"id": 15667327,
"name": "White t-shirt with copy space on gray background",
"slug": "merry-christmas",
"type": "vector",
"is_ai_generated": true,
"new": true,
"premium": true,
"url": "https://www.freepik.com/free-photo/white-t-shirts-with-copy-space-gray-background_15667327.htm",
"preview": {
"url": "https://www.freepik.com/free-ai-image/surreal-landscape_41357833.htm",
"width": 300,
"height": 500
},
"has_prompt": true,
"author": {
"id": 2147483647,
"name": "John Doe",
"avatar": "https://avatar.cdnpk.net/61668527-220726032514.jpg",
"assets": 0,
"slug": "merry-christmas"
}
}
]
},
"same_collection": {
"url": "https://www.freepik.com/collection/shining",
"items": [
{
"id": 15667327,
"name": "White t-shirt with copy space on gray background",
"slug": "merry-christmas",
"type": "vector",
"is_ai_generated": true,
"new": true,
"premium": true,
"url": "https://www.freepik.com/free-photo/white-t-shirts-with-copy-space-gray-background_15667327.htm",
"preview": {
"url": "https://www.freepik.com/free-ai-image/surreal-landscape_41357833.htm",
"width": 300,
"height": 500
},
"has_prompt": true,
"author": {
"id": 2147483647,
"name": "John Doe",
"avatar": "https://avatar.cdnpk.net/61668527-220726032514.jpg",
"assets": 0,
"slug": "merry-christmas"
}
},
{
"id": 15667327,
"name": "White t-shirt with copy space on gray background",
"slug": "merry-christmas",
"type": "vector",
"is_ai_generated": true,
"new": true,
"premium": true,
"url": "https://www.freepik.com/free-photo/white-t-shirts-with-copy-space-gray-background_15667327.htm",
"preview": {
"url": "https://www.freepik.com/free-ai-image/surreal-landscape_41357833.htm",
"width": 300,
"height": 500
},
"has_prompt": true,
"author": {
"id": 2147483647,
"name": "John Doe",
"avatar": "https://avatar.cdnpk.net/61668527-220726032514.jpg",
"assets": 0,
"slug": "merry-christmas"
}
}
]
}
},
"dimensions": { "width": 2000, "height": 3000 }
}
Was this page helpful?
⌘I