Get the user's most recent creations
curl --request GET \
--url https://api.magnific.com/v1/creations/recent \
--header 'x-magnific-api-key: <api-key>'import requests
url = "https://api.magnific.com/v1/creations/recent"
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/creations/recent', 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/creations/recent",
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/creations/recent"
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/creations/recent")
.header("x-magnific-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.magnific.com/v1/creations/recent")
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": [
{
"reference": "4fef9987-75d0-44d1-b336-65f42f883bff",
"tool_name": "text-to-image",
"folder_reference": "1e041aff-d0cf-48e0-a424-e8b2853ea8f8",
"thumbnail": {
"url": "https://cdn.freepik.com/thumbnails/8421.jpg"
},
"updated_at": "2023-03-07T23:05:26.000Z",
"user_id": 159327,
"name": "My awesome creation",
"created_at": "2023-03-07T23:05:26.000Z",
"external_id": "8421",
"id": 1337,
"folder_id": 98764,
"creation": {
"preview": "https://openapi-generator.tech",
"identifier": "a1b2c3d4",
"metadata": "{}",
"nsfw": false,
"raw": "https://openapi-generator.tech",
"created_at": "2023-03-07T23:05:26.000Z",
"tool": "text-to-image",
"url": "https://cdn.freepik.com/creations/8421.png",
"public": false,
"user_id": 159327,
"large_preview": "https://openapi-generator.tech",
"id": 8421,
"family": "image",
"status": "completed"
}
},
{
"reference": "4fef9987-75d0-44d1-b336-65f42f883bff",
"tool_name": "text-to-image",
"folder_reference": "1e041aff-d0cf-48e0-a424-e8b2853ea8f8",
"thumbnail": {
"url": "https://cdn.freepik.com/thumbnails/8421.jpg"
},
"updated_at": "2023-03-07T23:05:26.000Z",
"user_id": 159327,
"name": "My awesome creation",
"created_at": "2023-03-07T23:05:26.000Z",
"external_id": "8421",
"id": 1337,
"folder_id": 98764,
"creation": {
"preview": "https://openapi-generator.tech",
"identifier": "a1b2c3d4",
"metadata": "{}",
"nsfw": false,
"raw": "https://openapi-generator.tech",
"created_at": "2023-03-07T23:05:26.000Z",
"tool": "text-to-image",
"url": "https://cdn.freepik.com/creations/8421.png",
"public": false,
"user_id": 159327,
"large_preview": "https://openapi-generator.tech",
"id": 8421,
"family": "image",
"status": "completed"
}
}
],
"meta": {
"pagination": {
"per_page": 1,
"total": 1,
"last_page": 1,
"current_page": 1
}
}
}Creations API
Get the user's most recent creations
Retrieve the most recent creations of the user associated with your API key, enriched with each creation’s metadata. Paginated, newest first.
GET
/
v1
/
creations
/
recent
Get the user's most recent creations
curl --request GET \
--url https://api.magnific.com/v1/creations/recent \
--header 'x-magnific-api-key: <api-key>'import requests
url = "https://api.magnific.com/v1/creations/recent"
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/creations/recent', 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/creations/recent",
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/creations/recent"
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/creations/recent")
.header("x-magnific-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.magnific.com/v1/creations/recent")
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": [
{
"reference": "4fef9987-75d0-44d1-b336-65f42f883bff",
"tool_name": "text-to-image",
"folder_reference": "1e041aff-d0cf-48e0-a424-e8b2853ea8f8",
"thumbnail": {
"url": "https://cdn.freepik.com/thumbnails/8421.jpg"
},
"updated_at": "2023-03-07T23:05:26.000Z",
"user_id": 159327,
"name": "My awesome creation",
"created_at": "2023-03-07T23:05:26.000Z",
"external_id": "8421",
"id": 1337,
"folder_id": 98764,
"creation": {
"preview": "https://openapi-generator.tech",
"identifier": "a1b2c3d4",
"metadata": "{}",
"nsfw": false,
"raw": "https://openapi-generator.tech",
"created_at": "2023-03-07T23:05:26.000Z",
"tool": "text-to-image",
"url": "https://cdn.freepik.com/creations/8421.png",
"public": false,
"user_id": 159327,
"large_preview": "https://openapi-generator.tech",
"id": 8421,
"family": "image",
"status": "completed"
}
},
{
"reference": "4fef9987-75d0-44d1-b336-65f42f883bff",
"tool_name": "text-to-image",
"folder_reference": "1e041aff-d0cf-48e0-a424-e8b2853ea8f8",
"thumbnail": {
"url": "https://cdn.freepik.com/thumbnails/8421.jpg"
},
"updated_at": "2023-03-07T23:05:26.000Z",
"user_id": 159327,
"name": "My awesome creation",
"created_at": "2023-03-07T23:05:26.000Z",
"external_id": "8421",
"id": 1337,
"folder_id": 98764,
"creation": {
"preview": "https://openapi-generator.tech",
"identifier": "a1b2c3d4",
"metadata": "{}",
"nsfw": false,
"raw": "https://openapi-generator.tech",
"created_at": "2023-03-07T23:05:26.000Z",
"tool": "text-to-image",
"url": "https://cdn.freepik.com/creations/8421.png",
"public": false,
"user_id": 159327,
"large_preview": "https://openapi-generator.tech",
"id": 8421,
"family": "image",
"status": "completed"
}
}
],
"meta": {
"pagination": {
"per_page": 1,
"total": 1,
"last_page": 1,
"current_page": 1
}
}
}Authorizations
Your Magnific API key. Required for authentication. Learn how to obtain an API key
Query Parameters
Was this page helpful?