cURL
curl https://api.neuraldraft.io/v1/categories \
-H "Authorization: Bearer ndsk_live_yourkey"const cats = await nd.categories.list();
cats = requests.get("https://api.neuraldraft.io/v1/categories",
headers={"Authorization": f"Bearer {key}"}).json()["data"]
<?php
$cats = json_decode((string) $client->get('categories', [
'headers' => ['Authorization' => 'Bearer '.$key],
])->getBody(), true)['data'];
{
"data": [
{
"id": 7,
"name": "Wellness",
"slug": "wellness"
},
{
"id": 8,
"name": "Studio news",
"slug": "studio-news"
}
]
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}Blog
List blog categories
Read-only. Does not consume credits.
GET
/
categories
cURL
curl https://api.neuraldraft.io/v1/categories \
-H "Authorization: Bearer ndsk_live_yourkey"const cats = await nd.categories.list();
cats = requests.get("https://api.neuraldraft.io/v1/categories",
headers={"Authorization": f"Bearer {key}"}).json()["data"]
<?php
$cats = json_decode((string) $client->get('categories', [
'headers' => ['Authorization' => 'Bearer '.$key],
])->getBody(), true)['data'];
{
"data": [
{
"id": 7,
"name": "Wellness",
"slug": "wellness"
},
{
"id": 8,
"name": "Studio news",
"slug": "studio-news"
}
]
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"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.
Response
Array of categories.
Show child attributes
Show child attributes