Overview
Authentication, environments, and the public NextDocs v1 resource model.
NextDocs Public API v1
NextDocs exposes a versioned public API for creating artifacts, managing brands and themes, launching exports, and polling async resources.
All public endpoints live under /v1. The docs-native API reference
at API Reference is generated from the live OpenAPI
document.
Authentication
All endpoints require an API key. Include it in the Authorization header:
Authorization: Bearer nxd_your_api_key
Create an API key in your API settings.
Public Resources
POST /v1/artifactscreates an artifact synchronously and waits for AI generation to complete.POST /v1/artifacts/asyncqueues artifact creation and returns the artifact immediately withstatus="generating".POST /v1/exportscreates an export synchronously and waits for the export pipeline to complete.POST /v1/exports/asyncqueues an export and returns the export immediately withstatus="processing".GET /v1/artifacts/{id}andGET /v1/exports/{id}return the latest status ā poll these to track async work.GET /v1/embed/{artifactId}returns embeddable artifact payloads.GET /v1/brandsandGET /v1/themeslist reusable styling resources.
Environments
- Production docs should target
https://api.nextdocs.io. - Staging docs should target
https://api.stg.nextdocs.io. - Use the environment-specific API key and base URL that match the workspace you are testing.