What this gives you
- Translation keys — dot-namespaced keys (
hero.headline,pricing.tiers.0.title) with per-language values. One bulk endpoint feeds your build process. - Image keys —
data-image-key="hero.background"on an<img>. The customer can swap the image in the admin; your build resolves the URL. - Brand context — voice, colors, fonts, audience exposed as a single resource. Read once at build time, or hot-fetch per request.
- Register-component — turn generated HTML into an admin-editable
section in one call, with
data-translatekeys auto-discovered.
Quick example
Read a single key, then upsert one. The SDK exposes both as one-liners.bulkCreate (idempotent — existing keys are
skipped, not failed):
CMS writes are free. Content, page, component, gallery and image writes
through the API or MCP use no credits (rate limits apply). Credits are only
used when Neural Draft’s AI does the work, such as translating a key (10 per
language). See Credits and pricing.
Common workflows
1. Build-time fetch for SSG
Static-site generators (Next.js, Astro, Nuxt, Hugo) call/v1/content/bulk
once per locale at build time. Cache the response — re-fetch only when the
content.changed webhook fires.
2. The client edits the live site
Texts and pictures marked withdata-translate, <nd-text> or
data-image-key are editable in the admin’s visual editor (Website → Edit
site) and by chat in Claude or ChatGPT, without a rebuild. A static build that
reads /v1/content at build time should rebuild on the content.changed
webhook; a site hosted on Neural Draft or using nd.js updates by itself. See
Editable markup and Client editing.
3. AI registers a generated section
When the AI in your editor generates a hero, it callsregister_component(html, intent) via MCP. The component appears in your
admin instantly:
hero.headline as an editable text field. No schema
work.
4. Translate a key into N languages
SDK
cURL
Job reference. Poll /v1/jobs/{id} (or
nd.jobs.poll(id)) until terminal, or subscribe to the content.changed
webhook to get notified once each language lands. Charges 10 credits per
target language (translate_language).
5. Brand context for AI prompts
Read brand once, pass it into your AI calls. The MCP server does this for you; if you’re calling the API directly:SDK
cURL
Conventions
The two attributes the AI uses everywhere:section.field.0.subfield.
Per-page SEO meta
Search engines and social cards need per-route metadata —<title>,
<meta name=description>, and the og:* tags. Neural Draft stores this
on the page itself so each route can have its own values without polluting
the translation-key namespace.
There are two surfaces depending on what kind of content you’re rendering:
CMS-managed pages — GET /v1/pages/{slug}
For everything that isn’t a blog post (homepage, about, services, legal,
landing pages…), fetch the Page resource at build time and use the meta
fields directly. Every field is nullable; an empty meta_title means the
page title is used as the document title.
nd.pages.update(id, { meta_title: null }) (or pass null via cURL)
to clear a single meta field. Untouched fields are preserved — the API
merges the patch into the existing record.
Blog posts — GET /v1/blog-posts/{slug}
Posts have their own per-translation meta. The locale-aware response picks
the matching translation for meta_title / meta_description. Use
featured_image for og:image (it’s the canonical image associated with
the post).
Where to put what in your <head>
page.og_image with
post.featured_image.
Images
Image keys bind a stable key to a picture URL:upload() and replaceFile() accept a Web File/Blob or a Node
Buffer/Uint8Array (pass opts.filename for raw buffers). AI image
generation (POST /v1/images with a prompt, or regenerate) is retired and
answers 410 media_generation_moved: we don’t offer AI image or video
creation. We craft finished static ads and reels for your brand.
Reference
Forms — newsletter & contact
Most AI-built sites need two simple capture surfaces: an email-collector for newsletters and a free-form contact form. Neural Draft ships both as first-class endpoints — no schemas to design, no spam-handling glue, and free (no credits charged, since these are storage + delivery, not AI).Public submit
The submit endpoints are public. Authenticate the project with a server-side API key inX-NeuralDraft-Project-Key (or pass ?project_id= for
unauthenticated client-side embeds where you don’t want to ship a key):
Reading submissions
Form submissions are not in the outgoing-webhook event whitelist today — poll the admin list endpoints (GET /v1/newsletters, GET /v1/contact-forms)
or use the MCP tools list_newsletter_subscribers /
list_contact_form_submissions to inspect what came in. We may add
newsletter.subscribed / contact_form.submitted topics to the webhook
whitelist in a future release; subscribe to the changelog if
you’d like to be notified.
Admin list & delete
Listing and deleting submissions requires an API key withforms:read /
forms:write scope (or *). Both list endpoints support ?page /
?page_size (max 200) and ?search=; the newsletter list also accepts
?app_lead=true to filter out trial leads from your real subscriber list.