Skip to main content
POST
/
images
cURL
curl -X POST https://api.neuraldraft.io/v1/images \
  -H "Authorization: Bearer ndsk_live_yourkey" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Serene yoga studio at dawn","style":"photorealistic","aspect_ratio":"16:9","key":"hero.background"}'
{
  "id": "job_2Ngd9KqLmRpW",
  "type": "blog_post.generate",
  "status": "pending",
  "created_at": "2023-11-07T05:31:56Z",
  "progress": 50,
  "message": "<string>",
  "steps": [
    {
      "name": "<string>",
      "completed": true,
      "active": true
    }
  ],
  "result": {},
  "error": {
    "code": "upstream_unavailable",
    "message": "<string>"
  },
  "updated_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.neuraldraft.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage keys via /projects/me/api-keys. Test-mode keys use the ndsk_test_ prefix.

Body

application/json
prompt
string
required
Example:

"A serene yoga studio at dawn, soft sage and linen tones, no people"

style
string
Example:

"photorealistic"

aspect_ratio
enum<string>
default:16:9
Available options:
1:1,
16:9,
9:16,
4:5,
4:3,
3:2
key
string

Optional. If provided, the image is also addressable by this key.

Example:

"hero.background"

Response

Image generation job queued.

id
string
required
Example:

"job_2Ngd9KqLmRpW"

type
enum<string>
required
Available options:
blog_post.generate,
social_post.generate,
image.generate,
translation.batch,
content_plan.generate,
website.generate
status
enum<string>
required
Available options:
pending,
processing,
completed,
failed,
cancelled
created_at
string<date-time>
required
progress
integer
Required range: 0 <= x <= 100
message
string
steps
object[]
result
object

Result payload when status is completed. Shape depends on type:

  • blog_post.generate{ post_id, slug, title }
  • social_post.generate{ social_post_id, title, platforms }
  • image.generate{ url, key, width, height }
  • translation.batch{ keys_translated: int, locales: [string] }
error
object
updated_at
string<date-time>