Giant Context
Knowledge BaseDevelopersChangelogHealth
Join the Waitlist

Drafts

Generate, edit, preview, and publish content drafts.


POST

Generate a draft of changes to existing content

/drafts/generate/edit

Generates a reviewable edit draft for an EXISTING resource. The AI analyzes the current content, determines what to keep/modify/add/remove, and stages the edited version as a copy — the live content only changes when the draft is accepted. For brand-new content, use generateNewDraft.

BodyRequired
appId
string
promptRequired
string
packageId
string
projectIdRequired
string
resourceIdRequired
string
contentType
string
dependencies
array
draftPackage
object
organizationIdRequired
string
SDKcURL
curl -X POST "https://api.giantcontext.com/drafts/generate/edit" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "prompt": "prompt_value",  "projectId": "projectId_uuid",  "resourceId": "resourceId_uuid",  "organizationId": "organizationId_uuid"}'
POST

Generate a draft of new content

/drafts/generate/new

Generates NEW content as a reviewable draft from a natural language prompt. The draft is a proposal — nothing publishes until it is accepted. For changes to existing content, use generateEditDraft.

BodyRequired
appId
string
promptRequired
string
packageId
string
projectIdRequired
string
resourceId
any
contentType
string
dependencies
array
draftPackage
object
organizationIdRequired
string
SDKcURL
curl -X POST "https://api.giantcontext.com/drafts/generate/new" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "prompt": "prompt_value",  "projectId": "projectId_uuid",  "organizationId": "organizationId_uuid"}'
POST

Create an edit draft

/drafts/edit

Creates a draft copy of existing content for non-destructive editing. The original stays untouched until the draft is accepted. On accept, the copy's content replaces the original. On reject, the copy is deleted.

BodyRequired
prompt
string
projectIdRequired
string
resourceIdRequired
string
contentTypeRequired
string
organizationIdRequired
string
SDK
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const data = {};const { data: draft } = await gc.drafts.editDraft(data);
POST

Unarchive a draft

/organizations/{id}/projects/{projectId}/mind/drafts/{draftId}/unarchive

Restores a previously archived draft to the default list.

Parameters
idRequired
path · string
projectIdRequired
path · string
draftIdRequired
path · string
SDK
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { data: draft } = await gc.drafts.unarchiveDraft({  id: "id-123",  projectId: "proj-123",  draftId: "draft-123"});
POST

Archive a draft

/organizations/{id}/projects/{projectId}/mind/drafts/{draftId}/archive

Hides an accepted draft from the default list without deleting it. Archived drafts are preserved as a paper trail and for AI training data. Only accepted or partially_accepted drafts can be archived.

Parameters
idRequired
path · string
projectIdRequired
path · string
draftIdRequired
path · string
SDK
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { data: draft } = await gc.drafts.archiveDraft({  id: "id-1",  projectId: "proj-1",  draftId: "draft-1"});
GET

Get a draft by ID

/organizations/{id}/projects/{projectId}/mind/drafts/{draftId}

Retrieves the full details of a single AI-generated content draft including the prompt, generated content, tool calls, and sources.

Parameters
idRequired
path · string
projectIdRequired
path · string
draftIdRequired
path · string
SDK
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { data: draft } = await gc.drafts.getDraft({  id: "id_123",  projectId: "proj_123",  draftId: "draft_123"});
DELETE

Delete a draft

/organizations/{id}/projects/{projectId}/mind/drafts/{draftId}

Permanently deletes a draft. Only rejected, failed, or cancelled drafts can be deleted. Returns 409 if the draft is in any other status (pending, ready, accepted).

Parameters
idRequired
path · string
projectIdRequired
path · string
draftIdRequired
path · string
SDK
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { data: result } = await gc.drafts.deleteDraft({  id: "example-id",  projectId: "example-project-id",  draftId: "example-draft-id"});
GET

List drafts for a project

/organizations/{id}/projects/{projectId}/mind/drafts

Returns a paginated list of AI-generated content drafts for the specified project. By default archived drafts are hidden — pass includeArchived=true to include them.

Parameters
page
query · number
pageSize
query · number
lite
query · stringWhen 'true', return only essential fields (id, slug, title/name). Useful for context fetching, link resolution, and reducing payload size.
includeArchived
query · unionWhen true, archived drafts are included. Default: false.
idRequired
path · string
projectIdRequired
path · string
SDK
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { data: drafts } = await gc.drafts.listDrafts({  id: "YOUR_ID",  projectId: "YOUR_PROJECT_ID"});

BuiltAutonomously With AI
This content was built autonomously. Giant Context analyzed the site, determined what was missing, created and submitted an idea and draft, which Jesse accepted and published.
    Socials
    • Discord
    • BlueSky

    © 2026 Giant Context
    PrivacyTerms of UseCookie Policy
    Drafts