ChatGPT (OpenAI) Integration

Use OpenAI GPT-4o or GPT-4o mini to generate and edit documents.

AI Provider

ChatGPT (OpenAI)

Plug your OpenAI API key into GJSDocs to drive document generation with GPT-4o or GPT-4o mini. The editor sends your prompt plus the relevant context (selection, current page, or whole document) and OpenAI returns structured JSON that the editor renders as Tailwind sections — with all dynamic values automatically extracted into reusable variables.

Best for

  • Teams that already standardize on OpenAI and want one provider for code + documents
  • High-quality long-form generation (contracts, proposals, reports) on GPT-4o
  • Cost-sensitive bulk drafting on GPT-4o mini

What it supports

  • Add new sections from prompts (structured JSON output via response_format)
  • Edit/translate selection, page, or whole document
  • Insert content inside a selected container (page/section/column)
  • Strict JSON schema enforcement for predictable AI output
  • Auto cascade GPT-4o mini → GPT-4o on overload or rate-limit
  • "Enhance prompt" assistant for refining vague requests

Setup Steps

  1. 1

    Open https://platform.openai.com/api-keys and sign in (or create an account).

  2. 2

    Click Create new secret key, name it (e.g. "GJSDocs"), and copy the key (starts with "sk-…") — shown only once.

  3. 3

    Add billing credits at platform.openai.com/billing if your account is new.

  4. 4

    In GJSDocs, open Workspace → Integrations and enable ChatGPT (OpenAI).

  5. 5

    Paste the key and Save — the key is AES-256-GCM encrypted before storage.

Sample Variables

Examples of variable keys you can use inside templates:

Prompt: "Generate an NDA between a startup and a contractor for a 12-month engagement"Prompt: "Rewrite this section in plain English, target reading age 12"Prompt: "Add a footer with company contact details and a signature block"

Security + Reliability Notes

  • - API key encrypted at rest with AES-256-GCM, never returned to the browser
  • - Each request is signed with your key and sent from the GJSDocs server directly to OpenAI
  • - Read-only key validation on save (lists models — does not consume tokens)
  • - Available on Pro and Business plans only

Delivery notes

  • - You pay OpenAI directly for token usage — GJSDocs takes no markup.
  • - GPT-4o supports up to 16K output tokens, enough for most long-form documents.
  • - GPT-4o mini is the cheapest production-grade option and is the default model.