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": [
{
"id": 1337,
"reference": "4fef9987-75d0-44d1-b336-65f42f883bff",
"user_id": 159327,
"folder_id": 98764,
"folder_reference": "1e041aff-d0cf-48e0-a424-e8b2853ea8f8",
"name": "My awesome creation",
"external_id": "8421",
"thumbnail": {
"url": "https://cdn.freepik.com/thumbnails/8421.jpg"
},
"tool_name": "text-to-image",
"created_at": "2023-03-07T23:05:26.000Z",
"updated_at": "2023-03-07T23:05:26.000Z",
"creation": {
"id": 8421,
"identifier": "a1b2c3d4",
"family": "image",
"tool": "text-to-image",
"url": "https://cdn.freepik.com/creations/8421.png",
"raw": "https://openapi-generator.tech",
"preview": "https://openapi-generator.tech",
"large_preview": "https://openapi-generator.tech",
"public": false,
"nsfw": false,
"status": "completed",
"user_id": 159327,
"created_at": "2023-03-07T23:05:26.000Z",
"metadata": "{}"
}
},
{
"id": 1337,
"reference": "4fef9987-75d0-44d1-b336-65f42f883bff",
"user_id": 159327,
"folder_id": 98764,
"folder_reference": "1e041aff-d0cf-48e0-a424-e8b2853ea8f8",
"name": "My awesome creation",
"external_id": "8421",
"thumbnail": {
"url": "https://cdn.freepik.com/thumbnails/8421.jpg"
},
"tool_name": "text-to-image",
"created_at": "2023-03-07T23:05:26.000Z",
"updated_at": "2023-03-07T23:05:26.000Z",
"creation": {
"id": 8421,
"identifier": "a1b2c3d4",
"family": "image",
"tool": "text-to-image",
"url": "https://cdn.freepik.com/creations/8421.png",
"raw": "https://openapi-generator.tech",
"preview": "https://openapi-generator.tech",
"large_preview": "https://openapi-generator.tech",
"public": false,
"nsfw": false,
"status": "completed",
"user_id": 159327,
"created_at": "2023-03-07T23:05:26.000Z",
"metadata": "{}"
}
}
],
"meta": {
"pagination": {
"current_page": 1,
"per_page": 1,
"last_page": 1,
"total": 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": [
{
"id": 1337,
"reference": "4fef9987-75d0-44d1-b336-65f42f883bff",
"user_id": 159327,
"folder_id": 98764,
"folder_reference": "1e041aff-d0cf-48e0-a424-e8b2853ea8f8",
"name": "My awesome creation",
"external_id": "8421",
"thumbnail": {
"url": "https://cdn.freepik.com/thumbnails/8421.jpg"
},
"tool_name": "text-to-image",
"created_at": "2023-03-07T23:05:26.000Z",
"updated_at": "2023-03-07T23:05:26.000Z",
"creation": {
"id": 8421,
"identifier": "a1b2c3d4",
"family": "image",
"tool": "text-to-image",
"url": "https://cdn.freepik.com/creations/8421.png",
"raw": "https://openapi-generator.tech",
"preview": "https://openapi-generator.tech",
"large_preview": "https://openapi-generator.tech",
"public": false,
"nsfw": false,
"status": "completed",
"user_id": 159327,
"created_at": "2023-03-07T23:05:26.000Z",
"metadata": "{}"
}
},
{
"id": 1337,
"reference": "4fef9987-75d0-44d1-b336-65f42f883bff",
"user_id": 159327,
"folder_id": 98764,
"folder_reference": "1e041aff-d0cf-48e0-a424-e8b2853ea8f8",
"name": "My awesome creation",
"external_id": "8421",
"thumbnail": {
"url": "https://cdn.freepik.com/thumbnails/8421.jpg"
},
"tool_name": "text-to-image",
"created_at": "2023-03-07T23:05:26.000Z",
"updated_at": "2023-03-07T23:05:26.000Z",
"creation": {
"id": 8421,
"identifier": "a1b2c3d4",
"family": "image",
"tool": "text-to-image",
"url": "https://cdn.freepik.com/creations/8421.png",
"raw": "https://openapi-generator.tech",
"preview": "https://openapi-generator.tech",
"large_preview": "https://openapi-generator.tech",
"public": false,
"nsfw": false,
"status": "completed",
"user_id": 159327,
"created_at": "2023-03-07T23:05:26.000Z",
"metadata": "{}"
}
}
],
"meta": {
"pagination": {
"current_page": 1,
"per_page": 1,
"last_page": 1,
"total": 1
}
}
}Authorizations
Your Magnific API key. Required for authentication. Learn how to obtain an API key
Query Parameters
Results per page. It must be greater than 0.
Page number. It must be greater than 0.
Filter the creations by the tool that produced them.
Was this page helpful?
⌘I