cURL
curl "https://api.neuraldraft.io/v1/images?prefix=hero." \
-H "Authorization: Bearer ndsk_live_yourkey"const { data } = await nd.images.list({ prefix: "hero." });
import requests
url = "https://api.neuraldraft.io/v1/images"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neuraldraft.io/v1/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"key": "hero.background",
"url": "https://cdn.neuraldraft.io/prj_2NfQmBcKpXY8/hero-background-89hf.jpg",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"width": 2048,
"height": 1152,
"bytes": 482911,
"mime_type": "image/jpeg",
"generated": true
}
],
"meta": {
"page": 123,
"page_size": 123,
"total": 123,
"last_page": 123
}
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "This API key does not have the `commerce:write` scope.",
"code": "forbidden",
"instance": "req_2Nh4PqRsTuVw"
}Images
List registered images
Paginated list of image keys registered for the project (via
AI generation or multipart upload through POST /v1/images, or via
URL swap / regenerate through PUT /v1/images/{key}). Optional
prefix narrows by user-key prefix. Read-only. Does not consume credits.
GET
/
images
cURL
curl "https://api.neuraldraft.io/v1/images?prefix=hero." \
-H "Authorization: Bearer ndsk_live_yourkey"const { data } = await nd.images.list({ prefix: "hero." });
import requests
url = "https://api.neuraldraft.io/v1/images"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neuraldraft.io/v1/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"key": "hero.background",
"url": "https://cdn.neuraldraft.io/prj_2NfQmBcKpXY8/hero-background-89hf.jpg",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"width": 2048,
"height": 1152,
"bytes": 482911,
"mime_type": "image/jpeg",
"generated": true
}
],
"meta": {
"page": 123,
"page_size": 123,
"total": 123,
"last_page": 123
}
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "This API key does not have the `commerce:write` scope.",
"code": "forbidden",
"instance": "req_2Nh4PqRsTuVw"
}Authorizations
Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage
keys via /projects/me/api-keys. Test-mode keys use
the ndsk_test_ prefix.
Query Parameters
Filter by user-key prefix (e.g. hero. returns hero.background, hero.foreground).
Example:
"hero."
Required range:
x >= 1Required range:
1 <= x <= 200