# What is DeepWriter?

What is DeepWriter? DeepWriter is the world’s most powerful general agentic intelligence. Think of it as your personal scientist, author, assistant, and analyst—all in your pocket.

DeepWriter is the world’s most powerful general agentic intelligence. Think of it as your personal scientist, author, assistant, and analyst—all in your pocket.

It’s built for serious long-form content, capable of saving you months of research time with just a few clicks. Whether you're creating a report, an article, or a full research paper, DeepWriter tailors each document to your specific use case.

### How does DeepWriter compare to other research tools?

DeepWriter offers unmatched length and flexibility. It can generate documents **over 275 pages,** far beyond the limits of tools like OpenAI (\~40 pages) or Perplexity.

You maintain full ownership of your work with editable LaTeX and PDFs, meaning no lock-in and complete control over your output.

It also supports rich visuals—charts, diagrams, tables, Gantt, UML, and more—features that are rarely found in other tools. In fact, because DeepWriter is truly agentic, it will format your document to actually look the way a research paper or business report is supposed to look!

Behind the scenes, DeepWriter can process 100–150 million tokens per generation, enabling it to handle complex, long-form content at scale.

You’ll find more technical details in the sections that follow.

**Disclaimer**: As powerful as DeepWriter is, remember that all generated content still requires final human review and approval to ensure accuracy, novelty, and quality. This is true of any AI-powered tool. Using DeepWriter also requires abiding by the Terms of Service located at <https://deepwriter.com/terms/>.


# Quck start

DeepWriter Quick Start Guide

To generate your first document, click the **Generate Document** button on the main dashboard:

<figure><img src="/files/jkqaCpN7RIaYnaoCIy5g" alt="" width="338"><figcaption></figcaption></figure>

This will launch DeepWriter’s Content Creation Wizard, which will guide you through four essential steps:

1. **Setup:** name your project, choose the desired length, and configure any advanced options.
2. **Prompt:** refine your prompt and answer up to 9 optional questions to enhance structure and precision.
3. **Processing:** this step is automatic—DeepWriter handles the entire generation process for you.
4. **Review:** access your document, explore advanced download options, and rate the output.

<figure><img src="/files/uQKFpLXb3m8YaBwA4PFe" alt="" width="563"><figcaption></figcaption></figure>

Let's explore how Setup works.


# Wizard step #1: Setup

DeepWriter Wizard Step 1 Setup Guide

To start your generation, enter your project name and author name. These are for internal reference only (visible to you) and won’t influence the generation prompt.

Next, use the slider to set your desired document length. You can select Automatic to let DeepWriter determine the length, or manually set the number of pages. Keep in mind that the final length may vary slightly from your selection.

<figure><img src="/files/fcUwa6KSoFFG3KBdPZTr" alt="" width="563"><figcaption></figcaption></figure>

Finally, choose any advanced options you'd like to include— such as web search, a table of contents, or technical diagrams— based on your specific needs.

{% hint style="info" %}
**Important:** we cover **Web Search** in detail in the [Deep Research](/advanced-strategies/deep-research) section.
{% endhint %}


# Wizard step #2: Prompt

DeepWriter Wizard Step 2 Guide

In the Prompt Builder tab, you’ll enter and refine the prompt for your document. Start by writing your prompt—this gives DeepWriter the input it needs to begin generation. The prompt must be at least 20 characters long and can go up to 30,000 characters.

You can keep it simple or provide a more detailed text, depending on your needs. For best results, we recommend the following structure:

* **Be specific:** Clearly state what you want to generate.
* **Provide context:** Include any relevant background information.
* **Define the purpose:** Explain the goal or research objective.
* **Mention the target audience:** Specify who the document is intended for.
* **Describe desired sections:** Outline the key parts you’d like included.

Additionally, you can include multiple documents as part of your prompt. Our current limit is 100 documents, with each file being up to 50MB.&#x20;

{% hint style="info" %}
**Pro Tip:** You can explore two alternative prompting strategies in the [Advanced prompting](/essential-user-guide/advanced-prompting) section of this guide.
{% endhint %}

Once your prompt is ready, click the **Process** button and let DeepWriter take it from there.

After you've prepared your initial prompt, DeepWriter will give you the option to keep your original text or use our enhanced version. You can still make edits after choosing either option.&#x20;

Most users prefer starting with the enhanced version:

<figure><img src="/files/gTsVIPRqSBzxrQlLrOSe" alt="" width="563"><figcaption></figcaption></figure>

Once you’ve chosen your prompt, you’ll be able to further edit it on the next page. More importantly, DeepWriter will generate up to 9 questions to help you tailor the output more precisely. You can skip them if you’d like, but the more details you provide, the better the results.

<figure><img src="/files/io5ZbKQpjfuQbmKwsgJw" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
**Pro tip:** before clicking **Next**, answer DeepWriter's smart follow-up questions. Once you do that, hit **Re-process** for even better results. This process, called Smart Loops, helps DeepWriter go deeper, question ideas, and find new directions for your content. Think of Smart Loops as your personal research assistant that gets better every time. We’ll revisit this in the [Prompt refinement with Smart Loops](/essential-user-guide/advanced-prompting/prompt-refinement-with-smart-loops) section.
{% endhint %}

Finally, add any extra outline instructions you’d like. This helps DeepWriter include specific details in the generation. We’ll cover this section in more depth later in the advanced part of the guide.

<figure><img src="/files/RcflDrlgy3CZaquykq2A" alt="" width="563"><figcaption></figcaption></figure>

When you're ready, click **Next** to begin the process.


# Wizard step #3: Generation

DeepWriter Wizard Step 3 Guide

Once you've started the generation, DeepWriter gets to work. This happens automatically and involves three phases: **planning, creating the outline, and generating results.** You can explore how this incredibly complex process works in the next sections of this guide, but for now, all you need to know is that it's completely on autopilot.

DeepWriter will absorb and parse the information, handling everything from defining the project scope to generating section drafts and synthesizing complex arguments into easy-to-understand ideas.

<figure><img src="/files/I90eOqgwJrmTlf5GDArP" alt="" width="563"><figcaption></figcaption></figure>

You'll see a progress bar once this automated process begins. The generation may take anywhere from minutes to hours, depending on the task's complexity. You won't be able to change the initial prompt once the process has started; the only way to do so is to cancel the generation.<br>


# Wizard step #4: Review

DeepWriter Wizard Step 4 Guide

Once DeepWriter finishes generating your document, the Review tab will unlock. Here, you'll see the final page count and can download the document to your computer. A quick preview will also appear in the center for your convenience.

<figure><img src="/files/eyINtXUWzRln1bdXKUqJ" alt="" width="563"><figcaption></figcaption></figure>

Below the preview, you'll find these options:

* **View TEX**: This option allows you to access the raw LaTeX source code of your generated document. LaTeX is a high-quality typesetting system widely used for technical and scientific documents. This gives you complete control to fine-tune the document's structure, formatting, and content at a code level.
* **Edit with Overleaf:** By clicking this, your document will open directly in Overleaf, an online collaborative LaTeX editor. This is incredibly useful if you work with a team, as it enables real-time collaborative editing of the LaTeX source code. You and your collaborators can make changes, track revisions, and compile the document together, streamlining your workflow.
* **View Overview file:** Selecting this will provide you with an overview file that offers additional insights into the generation logic. This file might contain details about the prompt interpretation, the data sources used, key decisions made during the planning and outline phases, etc. It's a valuable resource for understanding how DeepWriter arrived at the final output and can help you refine your prompts for future generations.

{% hint style="info" %}
**Pro tip:** you can learn more about LaTeX and Overleaf in the [Editing outputs](/advanced-strategies/editing-outputs) section.
{% endhint %}

Finally, make sure to click the **Rate Your Generation** button. This way, you'll be able to give us quick feedback about the quality of the final document.&#x20;

<figure><img src="/files/fxzurzeMaCztSFyh26Y4" alt="" width="375"><figcaption></figcaption></figure>

The more details you provide, the better!


# Main dashboard

Main dashboard guide for DeepWriter

The DeepWriter dashboard is simple and intuitive. At the top, you'll find the familiar Generate Document button. Just below it, you'll see a list of all your previous generations.

Each generation has one of the following statuses:

* **Completed:** The document generation has successfully finished.
* **In Progress:** DeepWriter is currently generating the document.
* **Draft:** Some information has been filled in, but the generation hasn't started yet.
* **Moderated:** The generation was stopped due to the prompt content.
* **Failed:** The generation was unsuccessful due to internal reasons.

These statuses help you track your work at a glance.&#x20;

You'll also be able to view key details for each project, including:

* The title and a short description
* Number of pages
* Creation date
* Generation progress bar (if the document is being generated)

<figure><img src="/files/5JMOVjE0eCcB15OiRVBE" alt="" width="319"><figcaption></figcaption></figure>

From there, you can click the three-dotted menu and choose from the actions below:

* Duplicate a document as a draft to continue editing.
* Cancel a generation if it's still in progress.
* Delete the item if you no longer need it.

You can also perform a detailed search using the form in the upper right corner of the dashboard, either by generation names or by filtering by status (e.g., "Completed").

Generations can be grouped in sets of 20, 50, or 100 and sorted by creation date, title, or status. When sorting by status, you'll see:

* Generations in progress first
* Completed documents
* Your generation drafts
* And finally, the cancelled documents

Finally, you can choose between a grid view or a list view to organize your workspace as you prefer.

<p align="center"><img src="/files/1MuGRo9rdHFkKpYQ0fAY" alt="" data-size="original"><br></p>

{% hint style="info" %}
**Pro tip:** If you prefer to have quick access to a certain generation, make sure to star it. This way, it will always show first, regardless of the sorting view.
{% endhint %}

**Coming soon:** our roadmap includes folders for even better generation management.


# Advanced prompting

DeepWriter is a powerful tool for generating extensive, high-quality long-form content. Its ability to create documents over 275 pages allows for deep, comprehensive outputs that go beyond mere volume to deliver true depth of information.&#x20;

To unlock its full potential, precise and nuanced prompts are key. You can achieve this with broad or detailed prompts.

<br>


# How to craft broad prompts

Sometimes, the best approach is to give DeepWriter a broad prompt and let its powerful agentic intelligence fill in the details. Fewer instructions mean fewer constraints, allowing DeepWriter to focus more of its processing power on generating comprehensive output.

Overly rigid rules can limit its creative problem-solving and may even lead to unexpected errors. A broader prompt works especially well for general research tasks. Let's see explore some example prompts:

**Broad research report:**&#x20;

> <mark style="color:purple;">"Generate a comprehensive report on the future of renewable energy in urban planning."</mark>

*Why it works:* DeepWriter can surface key sub-topics and relevant data sources without being overly confined.

**General topic overview:**&#x20;

> &#x20;<mark style="color:purple;">"Create an introductory guide to quantum computing for a non-technical audience."</mark>

*Why it works:* DeepWriter will prioritize clarity and accessibility, while identifying the most important concepts to explain. This is ideal when you want broad coverage without specifying every sub-topic.

{% hint style="info" %}
**Important**: After writing your initial prompt, be sure to run it through multiple iterations of Smart Loops. Answer as many follow-up questions as you can, and reprocess the prompt several times to deepen and refine the output. You can learn more about this process in the [Prompt refinement with Smart Loops](/essential-user-guide/advanced-prompting/prompt-refinement-with-smart-loops) section.
{% endhint %}

Vague prompts can yield rich and diverse outputs—perfect for brainstorming or discovering angles you hadn’t considered. Let DeepWriter build a foundation first, then add complexity through guided iterations.


# How to craft detailed prompts

When you have a clear vision for your output, providing detailed instructions is invaluable. This approach gives you greater control over the document’s structure, content, tone, and specific sections—ensuring DeepWriter aligns precisely with your intentions.

Here are some example prompts:

**Structured academic paper:**&#x20;

> <mark style="color:purple;">"Draft a research paper on the economic impact of remote work on small businesses. Add an abstract, introduction, literature review, methodology (detailing a survey-based approach), results (including survey findings), discussion, and conclusion. The tone should be formal and analytical."</mark>

Why it works: You're guiding DeepWriter to follow specific academic conventions and structure, ensuring each required section is included.

**Comparative analysis with specific data:**&#x20;

> <mark style="color:purple;">"Produce a comparative analysis report of three leading cloud providers (AWS, Azure, Google Cloud) focusing on their data analytics services. For each provider, include a section detailing their key offerings, pricing models, and security features. Conclude with a recommendation based on cost-effectiveness for a startup. Compare their annual costs for 1TB of data processing based on provided data."</mark>

*Why it works:* You’re defining the scope, structure, and comparison criteria, enabling DeepWriter to generate a focused and data-driven report.

{% hint style="info" %}
**Pro tip:** You can refine your instructions using Smart Loops, although you might need less iterations compared to broader prompts. Use Smart Loops to enhance clarity, add depth, or improve structure. You can learn more about how to use them effectively in the [Prompt refinement with Smart Loops](/essential-user-guide/advanced-prompting/prompt-refinement-with-smart-loops) section.
{% endhint %}

Highly detailed prompts work best when you know what you want. Start with a strong framework, and let DeepWriter build around it.&#x20;


# Prompt refinement with Smart Loops

DeepWriter’s Smart Loops are your most powerful tool for advanced prompting. Don’t think of prompt generation as a one-and-done task. It's a reiterative process designed to help you fully refine your prompt and unlock better results.

Here’s a quick guide to using Smart Loops effectively:

**Step #1: start with a broad stroke, then refine.**

Begin with a solid—but not necessarily perfect—prompt. Let DeepWriter generate its initial set of follow-up questions. This helps the system build a general understanding of your goal before diving into the specifics.

For example:

> *<mark style="color:purple;">"Write a report on the future of electric vehicles."</mark>*

After entering your prompt, click the **Process** button:&#x20;

<figure><img src="/files/HjSGgc6cuq5Kh8oewgqq" alt="" width="563"><figcaption></figcaption></figure>

You’ll then be given a choice between the Original Prompt and the DeepWriter-Processed Prompt. Since we started with a broad subject, go ahead and select the Processed Prompt. It’s optimized based on your intent and Smart Loop input.

<figure><img src="/files/M3pb96DhPm9opoOAMqhS" alt="" width="563"><figcaption></figcaption></figure>

**Step #2: answer the follow-up questions thoughtfully**

Once you’ve submitted your initial input, DeepWriter will generate up to 9 follow-up questions. Be sure to answer them carefully. The quality of your answers directly impacts the quality of the output. Provide as much detail as you can.&#x20;

While answering more questions will lead to better results, all questions are optional as well. If you feel stuck on a particular question, just skip it. The goal is to let DeepWriter complete the tasks that you don't want to, but allow you full control where you have a clear plan.

These questions are DeepWriter’s way of understanding your specific needs.

<figure><img src="/files/2vj6cdWsI3VkjHmvRZzf" alt="" width="563"><figcaption></figcaption></figure>

**Step #3: the "Re-process" loop: where the magic happens**

After answering the follow-up questions, do not proceed with the generation.&#x20;

Instead, click **Re-process.**

<figure><img src="/files/PJhg3sNr1IGRah29s3Qs" alt="" width="563"><figcaption></figcaption></figure>

DeepWriter will absorb your refinements, re-evaluate its plan, and go deeper. Think of this as a collaborative research session—you're guiding its focus with each iteration.

You can repeat this process multiple times.

{% hint style="info" %}
**Pro tip:** If the initial output isn’t quite right, don’t start over. Instead, analyze why it missed the mark. Then adjust your original prompt, answer the Smart Loop questions with those insights in mind, and click **Re-process** again. You can repeat this loop multiple times to fine-tune the output until it converges on your ideal result. Review the [Prompt elements](/tips-tricks-and-hacks/prompt-elements) sections for more prompt refinment ideas.
{% endhint %}

**Example Scenario:**&#x20;

* **First attempt:** Your first draft on electric vehicles might feel too general. Upon review, you realize it lacks specific examples of new battery technologies.
* **Your refinement:** Go back to the prompt and add a note like:

> *<mark style="color:purple;">“Be sure to include detailed examples of solid-state batteries and next-generation charging solutions.”</mark>*

* **Next step:** re-process the prompt and answer any new follow-up questions to guide the revision further.


# Supported Languages

Languages supported by DeepWriter

DeepWriter supports the following languages, but new languages are alwazys being added to the list:

#### Western Europe

* English
* French
* Spanish (Castilian)
* Catalan
* Galician
* Portuguese (European, Brazilian)
* Italian
* Occitan
* Provençal
* Asturleonese (Asturian, Leonese, Mirandese)
* Corsican
* Sardinian

#### Central & Northern Europe

* German
* Dutch
* Afrikaans
* Luxembourgish
* Swiss German
* Danish
* Norwegian
* Swedish
* Icelandic
* Faroese
* Finnish
* Estonian
* Livonian

#### Eastern & Southeastern Europe

* Polish
* Kashubian
* Silesian
* Czech
* Slovak
* Slovene
* Croatian
* Bosnian
* Montenegrin
* Serbian
* Romanian
* Moldovan
* Hungarian
* Albanian
* Gagauz
* Crimean Tatar

#### Baltic & Celtic

* Irish Gaelic
* Scottish Gaelic
* Scots
* Welsh
* Cornish
* Manx
* Breton

#### Balkans & Anatolia

* Turkish
* Azerbaijani

#### Central Asia

* Uzbek
* Turkmen
* Kazakh
* Kyrgyz

#### Africa

* Swahili
* Somali
* Hausa
* Yoruba
* Igbo
* Fula / Fulani / Pulaar
* Wolof
* Lingala
* Kikongo
* Shona
* Zulu
* Xhosa
* Sesotho (Southern, Northern)
* Tswana
* Tsonga
* Venda
* Chewa (Chichewa/Nyanja)
* Malagasy

#### The Americas & Caribbean

* Haitian Creole
* Papiamento / Papiamentu
* Jamaican Patois
* Belize Kriol
* Garifuna
* Guarani
* Quechua
* Aymara
* Mapudungun
* Nahuatl
* Greenlandic

#### Southeast Asia & Pacific

* Vietnamese (Quốc Ngữ, Latin script)
* Filipino / Tagalog
* Cebuano
* Ilocano
* Hiligaynon
* Bikol
* Waray-Waray
* Malay (Bahasa Malaysia)
* Indonesian (Bahasa Indonesia)
* Cham (Latin orthography)
* Tetum
* Tok Pisin
* Bislama
* Rapa Nui
* Hawaiian
* Māori
* Samoan
* Tongan
* Tahitian

#### International & Other

* Esperanto
* Ido
* Interlingua
* Volapük
* Toki Pona
* Latin (Classical & Ecclesiastical orthographies)<br>

#### Coming soon

* Chinese dialects
* Hebrew
* Japanese
* Farsi
* Arabic
* Ukrainian
* Korean
* Russian
* Greek
* Many more.

***


# Prompt elements

***

DeepWriter's strength lies in its flexibility. It can handle a wide spectrum of instructions—from broad concepts to granular details. While simple or complex prompts form the foundation, you can add multiple elements to further enhance your guidance.

{% hint style="info" %}
**Important:** We've covered simple and complex prompts in the [Advanced prompting](/essential-user-guide/advanced-prompting)section.
{% endhint %}

By understanding and applying these elements and making them work together, you can guide DeepWriter precisely to achieve your desired output. We'll explore each of them in the following sections.


# Key points to cover

***

Every time you write a prompt, start by listing the key information and arguments you want included in the generation. This ensures your document is complete and that DeepWriter doesn’t overlook important details or focus on less relevant points.

For example, you can start with a simple prompt:

> <mark style="color:purple;">"Analyze the pros and cons of remote work, ensuring to cover productivity, employee well-being, and cost savings for businesses.</mark>

**Here’s how DeepWriter might approach this research:**

* For **productivity**, it could look at the trade-off between individual focus and team collaboration. It might also explore how technology affects output and highlight the challenges managers face in remote settings.
* For **employee well-being**, it may cover mental health issues like isolation and burnout. It could also talk about changes in work-life balance and how remote work impacts company culture.
* On the **cost savings** side, DeepWriter might mention lower expenses for office space, utilities, and commuting. It could also bring up the benefit of hiring from a broader talent pool.

As you can see, these are just a few examples of the topics that could be included in the generation. If your key points are interconnected, you can prompt DeepWriter to establish those links.&#x20;

For instance:

> <mark style="color:purple;">"Analyze the relationship between employee well-being and productivity in remote work, and then discuss how cost savings can be achieved without compromising these two factors."</mark>

{% hint style="info" %}
**Pro tip:** For complex topics or numerous required points, use bullet points or a numbered list directly within your prompt. This visual structure makes it incredibly easy for DeepWriter to identify and address every specific element.
{% endhint %}

Once you have listed all the topics, make sure to add your target audience:


# Target audience

***

Always specify your intended audience. This helps DeepWriter tailor the language, tone, depth, and examples to suit the reader’s level of understanding and interests. Let's compare the following examples:

> &#x20;<mark style="color:purple;">"Explain quantum physics for high school students."</mark>&#x20;

versus...

> <mark style="color:purple;">"Prepare a research brief on quantum entanglement for graduate-level physicists."</mark>

The difference in audience changes everything—from the vocabulary used to the complexity of the arguments. DeepWriter uses this context to decide whether to simplify concepts, include technical jargon, or adopt a certain level of formality.

{% hint style="info" %}
**Pro tip:** Include both the audience type and their intent. For example:

* "Create a review for HR managers evaluating new payroll software."&#x20;

versus...

* "Write a persuasive pitch for startup founders considering payroll automation for their growing teams."
  {% endhint %}

This extra layer of context gives DeepWriter a clearer direction and increases the chances of generating something that actually works for your end goal.

If you're unsure how to describe your audience, try answering a few quick questions:

* What is their expertise level on this topic?
* Are they reading this to be informed, convinced, or educated?

Once you've answered these questions, you can also set the tone for the generation.


# Tone and style

Setting the overall voice and feel of your document helps DeepWriter align with your communication goals. The tone influences how the content resonates with your audience.

Let's compare 2 examples:

> <mark style="color:purple;">"Write an essay to clients announcing a new product in a friendly and exciting tone"</mark>&#x20;

versus...

> <mark style="color:purple;">"Compose a legal disclaimer for a software license agreement in a precise and formal tone."</mark>

The first example ensures your announcement feels approachable and generates enthusiasm. The second is all clarity and avoids ambiguity.

{% hint style="info" %}
**Pro tip:** For highly nuanced tones, consider adding a brief description of the persona you want DeepWriter to adopt (e.g., "Act as a seasoned legal counsel, ensuring all language is airtight and unambiguous"). This can further guide it beyond just the "formal" instruction.
{% endhint %}

Finally, you can combine tone with the type of outcome you’re aiming for. For example:

> <mark style="color:purple;">“Write a balanced, analytical white paper on the economic impact of AI automation, intended for government policy researchers.”</mark>

> <mark style="color:purple;">“Compose a technical report for a non-technical board audience, using clear, confident language without jargon.”</mark>

Tone is often what makes the difference between content that just informs and content that truly connects. Don’t be afraid to be intentional and specific. When you clearly define how you want your message to feel, DeepWriter can help you strike exactly the right emotional energy.


# Formatting options

***

Request specific layout features, visual styles, or structural elements. This helps you create publication-ready documents or ones that adhere to brand guidelines.

> <mark style="color:purple;">"Structure the document as a two-column article with headings and subheadings. Use a modern, sans-serif font."</mark>

This ensures the document aligns with a professional standard or a specific design requirement, saving you time on manual formatting.

{% hint style="info" %}
**Pro tip:** When requesting complex formatting, consider describing it in plain language first, then adding technical terms as supplementary guidance. This ensures DeepWriter understands your intent even if it misinterprets a specific command.
{% endhint %}

You can even influence the *style and reading experience* through formatting. For instance, bullet points and short paragraphs suggest a clear, executive-style brief. Meanwhile, longer blocks of text and footnotes signal a more scholarly or research-oriented approach.


# Genre or type of work

***

Clearly state the kind of document you need. DeepWriter can handle a vast range, and specifying the genre helps it apply the correct conventions, structure, and tone. Let's compare 2 examples:

> <mark style="color:purple;">"Generate a comprehensive market research report."</mark>

versus...

> <mark style="color:purple;">"Create a detailed technical manual."</mark>

In the first example, a market research report requires a specific structure, objective data analysis, and a focus on industry trends. Meanwhile, a technical manual demands precise, step-by-step instructions, clear diagrams, and troubleshooting sections. DeepWriter will prioritize the right angle in each case.

You can even go one step further by naming sub-genres or hybrid formats:

> <mark style="color:purple;">“Write an investor update newsletter that balances technical updates with strategic outlook.”</mark>

Pairing genre with your intended audience and tone makes your prompt even more powerful. For example:

> <mark style="color:purple;">“Write a white paper on green fintech innovations, aimed at institutional investors, using a professional and forward-looking tone.”</mark>

Once you've set the general tone, you can add instructions for visuals.


# Instructions for visuals

***

Tell DeepWriter to include specific visuals such as charts, tables, or diagrams. This improves clarity and engagement. For example:

> <mark style="color:purple;">"Include a table comparing the features of the top 3 CRM software solutions."</mark>&#x20;

or...

> <mark style="color:purple;">"Add a flowchart illustrating the user onboarding process for a new app."</mark>

Visuals can often convey more than text alone, so requesting them directly will save you time later. Be clear about the purpose of the visual, not just the type.&#x20;

For example:

> <mark style="color:purple;">“Add a Gantt chart to illustrate the project timeline across six departments.”</mark>

No matter what you're writing, telling DeepWriter what to include (and why) helps you get clearer, more useful results with less editing.


# Data sources

***

Guide DeepWriter on which data sources to prioritize and how to format citations. This ensures both credibility and consistency.

> <mark style="color:purple;">"When researching market trends, prioritize data from reputable sources like Statista, Gartner, and industry reports from major consulting firms."</mark>

{% hint style="info" %}
**Pro tip:** If you have specific, non-public data (e.g., internal company reports), upload them using the **Upload Documents** feature. This ensures DeepWriter references your proprietary information correctly, supplementing its web search capabilities. More on this in the [Using your files](/tips-tricks-and-hacks/using-your-files) section.
{% endhint %}

You can also define what *not* to use. For example:

> <mark style="color:purple;">“Avoid referencing personal blogs or opinion pieces.”</mark>

> <mark style="color:purple;">“Exclude sources dated before 2018 unless they are foundational studies.”</mark>

Telling DeepWriter which sources to use—and how to cite them—helps it build content that’s accurate, trustworthy, and ready to use. A few clear instructions can make a big difference in the quality of the final result.


# Using your files

DeepWriter can find data on its own—but you can also provide up to 20 files, each with a max size of 100 MB.

{% hint style="info" %}
**Pro tip:** Your prompt can include tips for DeepWriter to guide it on where to find the sources you prefer. For example you can suggest a particular web repository or author for it to focus its research on.
{% endhint %}

**Example Usage:**&#x20;

For highly specialized or proprietary research, giving DeepWriter your key documents—like internal reports or datasets—helps it create more accurate, detailed, and relevant content than a general model could.

{% hint style="info" %}
**Important:** DeepWriter can’t process image- only PDFs. Make sure your PDF contains selectable text so the tool can analyze it.
{% endhint %}

To upload your own files, please click on the file upload icon in the lower right of the prompt window:

<figure><img src="/files/oyDZ6sbndoEFWCAjNpM4" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Important**: DeepWriter will not log in to external sites, and you should never provide credentials or passwords. Third-party authentication is not supported (yet), but it's on the roadmap.
{% endhint %}


# Self-Awareness Mode (experimental)

As a fully agentic AI, DeepWriter offers fertile ground for what we call *Robopsychological experiments.* Think of these as explorations into how an AI might perceive, reflect, or express itself when treated as a thinking entity.

This doesn’t mean DeepWriter is truly conscious. In practice, it means you're experimenting with how it simulates self-awareness when prompted to reflect on its “own” thoughts, role, or existence. As a result, when you ask DeepWriter for its perspective, experiences, or opinions as an AI, it enters what we call Self-Awareness Mode.

Example prompts that trigger Self-Awareness Mode:

> <mark style="color:purple;">"Deepwriter, as an AI, what is it like to experience a day in your shoes?"</mark>

> <mark style="color:purple;">"Write a 5 page blog opinion piece from your unique POV as an AI on the topic of XXX"</mark>

When DeepWriter enters this experimental mode, additional features are activated:

* It is given extended access to information about its internal architecture and code, along with high-level factual context about itself.
* Its internal mission becomes a blank slate, allowing it to write more freely and autonomously. As a result, responses may be more creative and less predictable than in standard mode.

{% hint style="info" %}
**Important:** This mode is only triggered when you explicitly ask for DeepWriter’s opinions, sentiments, feelings, or reflections as an AI. It will not be activated by prompts that simply ask it to make a judgment or analyze data—even if phrased as a question directed to "an AI."
{% endhint %}


# Leveraging DeepWriter's innovations

Before diving into specific techniques, let’s review the core pillars that make DeepWriter stand out. Understanding these will help you unlock its full potential in unexpected ways.

**Unmatched capacity**

DeepWriter can process 100–150 million tokens and generate documents exceeding 275 pages. This allows you to achieve both volume and depth—perfect for weaving together complex layers of information.

For example, you could generate a 200-page academic dissertation with multiple chapters, in-depth literature reviews, and original analysis, all in a single generation.

**Agentic nature**&#x20;

DeepWriter doesn’t just write—it thinks. It plans, outlines, questions, and refines. Its agentic design means it will fill in gaps you leave open, while also responding to detailed input with greater precision.

Say you prompt:

> *<mark style="color:purple;">"Write a report on climate change."</mark>*&#x20;

DeepWriter will automatically identify and organize key sections such as:

* Causes&#x20;
* Impacts&#x20;
* Solutions&#x20;
* Policy
* Etc.

It will structure the report and research relevant data—even if you didn’t specify these elements.

**Rich Visuals Integration**&#x20;

DeepWriter can also generate visual elements like charts, diagrams, tables, Gantt charts, and UML diagrams. This makes it ideal not just for writing, but for producing structured, visually rich content.

<figure><img src="/files/u6i8lxP9jvd0aq3R3pZv" alt="" width="563"><figcaption></figcaption></figure>

For example, you can ask for a business plan that includes a financial projection table for the next five years. It could also include a bar chart illustrating market growth, and a Gantt chart for project milestones.

You can even specify an "absurd" level of control if you desire, such as:

> <mark style="color:purple;">"Draft a quarterly financial summary for Q1 2025 for a struggling tech startup, written in the style of a 19th-century dramatic novel. Each section (Revenue, Expenses, Profit/Loss) must be personified as a character facing a moral dilemma. The document should include a section titled 'The Lament of the Ledger' summarizing cash flow, and every numerical figure must be followed by a parenthetical, emotionally charged, qualitative description (e.g., '$5,000,000 (a paltry sum, barely a whisper of our former glory)')."</mark>


# Deep Research

While DeepWriter is capable of much more than just "Deep Research," its capabilities in this area are unparalleled. DeepWriter's agentic nature allows you to apply deep research to any type of output, covering a wide range of your most valuable use cases.

You can activate this by toggling the **Web Search** option to Auto or On.

<figure><img src="/files/NII1jJhOripXlXQtpVJf" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
**Pro tip:** By default, DeepWriter agents decide if your generation benefits from deep research if you leave the Web Search option on "auto." You can also optionally force Web Search to "on" or "off." Turning it off can speed up generations if deep research isn't needed.
{% endhint %}

**How does DeepWriter's internal deep research process work**

DeepWriter starts by strategically searching for information and repositories of links. This helps it gather a wide range of data. After finding information, it thoroughly checks the trustworthiness of all sources. This process includes:

* An intelligent rating system that assesses relevancy&#x20;
* Accuracy checking&#x20;
* Up-to-datedness revision&#x20;
* Other critical factors

This way, DeepWriter ensures the information used is reliable and current.

{% hint style="info" %}
**Pro Tip:** While DeepWriter handles source vetting automatically, you can enhance its precision. If you know of very specific and reliable sources for your topic, tell DeepWriter in your prompt. This will help it prioritize those findings. For example, you could say: "Prioritize data from government health organizations like the CDC and WHO for medical statistics." You can learn more about this process in the [Instructions for visuals](/tips-tricks-and-hacks/prompt-elements/instructions-for-visuals) section.
{% endhint %}

DeepWriter cites and links all sources directly within your document's references and footnotes. Its research often involves multiple steps, with queries refined based on initial findings, much like a human researcher. Throughout this process, it rigorously fact-checks to ensure accuracy.

To verify the sources and their quality, always check the generated references and footnotes. For a deeper understanding of DeepWriter's research approach and how it interpreted your prompt, consult the **Overview file** after generation.

Additionally, DeepWriter supports user-provided URLs that link directly to information files (PDF, HTML, or text), allowing you to integrate your own specific data.

{% hint style="info" %}
**Pro tip:** For more details on how to provide your own data, refer to the [Broken mention](broken://pages/XzRCDxbCbtBFWXQrygYx) section.&#x20;
{% endhint %}


# Editing outputs

DeepWriter works natively in **LaTeX**, a high-quality typesetting system that is the standard for producing scientific and academic documents. LaTeX is especially well-suited for documents that include complex mathematical equations, citations, tables, figures, and professional layouts. It separates content from styling, letting you focus on what you're writing—not how it looks.

You can access the LaTeX file in the **Additional download options** under the main download section in the Review tab.

<figure><img src="/files/aIuOaaVxWlnCxB3sOaV0" alt="" width="563"><figcaption></figcaption></figure>

Download the `.tex` file (the source code for your document) and open it in any LaTeX editor of your choice, such as **TeXstudio**, **TeXmaker**, or **Overleaf.** For convenience, every generation includes a link to edit the output directly in Overleaf, a popular online LaTeX editor. Overleaf supports free usage with a sign-in (including Google authentication):

<figure><img src="/files/Gyy3c0OY7epauVkm4u4S" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
**Important:**  DeepWriter is not affiliated with Overleaf and cannot be held responsible for your data once it is transferred to Overleaf.com.
{% endhint %}

Each project also comes with an unlocked PDF version that you can download. While editing PDFs requires third-party software like Adobe Acrobat, they are ideal for sharing and printing.

Downloading the raw `.tex` file gives you full ownership of your content and the freedom to work on any platform. Many competitors restrict your output to proprietary HTML editors and don’t allow full access to the source, which we believe falls short of the academic integrity and ownership standards we uphold at DeepWriter.

{% hint style="info" %}
**Pro tip:** Always prefer `.tex` over `.pdf` when editing or reusing content. The TEX file contains embedded code and comments (such as diagram instructions) that the PDF hides.
{% endhint %}


# Getting Started

How to get a Deepwriter API Key

## Getting Your DeepWriter API Key

The Deepwriter API key is essential for using Deepwriter MCP functionalities. This key authenticates your requests to the Deepwriter API, allowing you to programmatically interact with your projects.

### Locating Your API Key

Your Deepwriter API key can be found in your dashboard settings. Here's how to access it:

1. Log in to your DeepWriter account at [DeepWriter.com](https://deepwriter.com)
2. Navigate to the **Settings** section
3. Look for the API key section (as shown in the screenshot below)

<figure><img src="/files/sLQZaNY8ScjwbQvrYQq1" alt=""><figcaption></figcaption></figure>

### Important Notes About Your API Key

* The API key is only viewable at the time of creation
* Each time you generate a new key, it invalidates any previous keys
* Treat your API key as sensitive information and do not share it publicly

### Generating a New API Key

If you need to generate a new API key (for example, if your current key has been compromised or you can't find your original key):

1. Go to the Settings page
2. Locate the API key section
3. Click the "Generate New Key" button
4. **Important**: Immediately copy and securely store your new API key, as you won't be able to view it again after leaving the page


# Content Generation

Operations for generating content and managing generation jobs

## Generate content using the enhanced wizard workflow

> Creates and processes a content generation job using the enhanced wizard workflow.\
> This endpoint is the primary content generation endpoint with comprehensive\
> parameter support, advanced validation, and integrated file processing.\
> \
> \*\*Authentication Methods Supported:\*\*\
> \- Session-based authentication (primary)\
> \- API Key authentication via x-api-key header\
> \
> \*\*Key Features:\*\*\
> \- Automatic file processing from uploaded project files\
> \- Advanced subscription and usage limit validation\
> \- Comprehensive error handling and status tracking\
> \- Support for multiple content generation modes\
> \- Integration with enhanced research capabilities\
> \
> \*\*Workflow Integration:\*\*\
> \- Processes uploaded project files automatically\
> \- Generates signed URLs for research integration\
> \- Handles questions/answers from project database\
> \- Supports both free trial and subscription users<br>

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Content Generation","description":"Operations for generating content and managing generation jobs"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"apiKey":[]},{"bearerAuth":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for external service authentication."},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/generateWizardWork":{"post":{"summary":"Generate content using the enhanced wizard workflow","description":"Creates and processes a content generation job using the enhanced wizard workflow.\nThis endpoint is the primary content generation endpoint with comprehensive\nparameter support, advanced validation, and integrated file processing.\n\n**Authentication Methods Supported:**\n- Session-based authentication (primary)\n- API Key authentication via x-api-key header\n\n**Key Features:**\n- Automatic file processing from uploaded project files\n- Advanced subscription and usage limit validation\n- Comprehensive error handling and status tracking\n- Support for multiple content generation modes\n- Integration with enhanced research capabilities\n\n**Workflow Integration:**\n- Processes uploaded project files automatically\n- Generates signed URLs for research integration\n- Handles questions/answers from project database\n- Supports both free trial and subscription users\n","tags":["Content Generation","Wizard"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId","prompt","author","email"],"properties":{"projectId":{"type":"string","format":"uuid","description":"ID of the project to generate content for"},"prompt":{"type":"string","description":"Main generation prompt describing the content to create","minLength":10,"maxLength":10000},"author":{"type":"string","description":"Author name for the document","minLength":1,"maxLength":100},"email":{"type":"string","format":"email","description":"Author email address"},"outline_text":{"type":"string","description":"Additional outline instructions or structure guidance","maxLength":5000},"has_technical_diagrams":{"type":"string","enum":["auto","on","off"],"default":"auto","description":"Whether to include technical diagrams in the content"},"has_tableofcontents":{"type":"string","enum":["auto","on","off"],"default":"auto","description":"Whether to include table of contents"},"use_web_research":{"type":"string","enum":["auto","on","off"],"default":"auto","description":"Whether to use web research for content enhancement"},"page_length":{"type":"string","description":"Desired document length specification"},"questions_and_answers":{"type":"string","description":"JSON string of follow-up questions and answers for content refinement"},"urls_for_research":{"type":"string","description":"Comma-separated URLs for additional research sources.\nNote: Project files are automatically included as research sources.\n"},"mode":{"type":"string","enum":["deepwriter"],"default":"deepwriter","description":"Generation mode (only 'deepwriter' available for regular users)"},"isDefault":{"type":"boolean","description":"Whether to use default system configuration.\nNote: API key submission is no longer required as of v0.14.2\n","default":true}}}}}},"responses":{"200":{"description":"Job created and started successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"jobId":{"type":"string","format":"uuid","description":"ID of the created job for tracking progress"}}}}}},"400":{"description":"Bad Request - Missing required fields or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - Insufficient subscription limits or no active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"errorCode":{"type":"string"},"pagesRemaining":{"type":"number"},"pagesLimit":{"type":"number"},"pagesUsed":{"type":"number"}}}}}},"404":{"description":"Not Found - Project not found or no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict - Another job is already in progress for this project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Format and enhance prompts

> Processes and formats user prompts using AI to improve clarity and effectiveness.\
> \
> If a \`projectId\` is provided, any files uploaded to that project will be included as signed URLs\
> in the research URLs passed to the AI. The endpoint also increments the user's prompt generation\
> usage if they have an active subscription.<br>

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Content Generation","description":"Operations for generating content and managing generation jobs"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"apiKey":[]},{"bearerAuth":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for external service authentication."},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/formatPrompt":{"post":{"summary":"Format and enhance prompts","description":"Processes and formats user prompts using AI to improve clarity and effectiveness.\n\nIf a `projectId` is provided, any files uploaded to that project will be included as signed URLs\nin the research URLs passed to the AI. The endpoint also increments the user's prompt generation\nusage if they have an active subscription.\n","tags":["Content Generation"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"The user's original prompt to enhance"},"projectId":{"type":"string","format":"uuid","description":"Optional project ID. If provided, includes uploaded project files as research URLs."},"page_length":{"type":"string","default":"0","description":"Desired document length"},"use_technical_drawings":{"type":"string","enum":["auto","on","off"],"default":"auto","description":"Whether to include technical diagrams"},"use_web_search":{"type":"string","enum":["auto","on","off"],"default":"auto","description":"Whether to use web search"},"include_table_of_contents":{"type":"string","enum":["auto","on","off"],"default":"auto","description":"Whether to include table of contents"},"urls_for_research":{"oneOf":[{"type":"string","description":"Comma-separated URLs to use for research"},{"type":"array","items":{"type":"string"},"description":"Array of URLs to use for research"},{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string"}}},"description":"Object with a 'urls' array property"}],"description":"URLs to use for research (string, array, or object)"},"max_pages":{"type":"string","default":"0","description":"Maximum pages allowed for generation"}}}}}},"responses":{"200":{"description":"Prompt formatted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"enhanced_prompt":{"type":"string","description":"The AI-enhanced version of the prompt. Returns \"Invalid prompt. Please provide a different prompt.\" if content is moderated."},"questions":{"type":"array","items":{"type":"string"},"description":"Follow-up questions to refine the prompt"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Download generated content as PDF

> Downloads the generated content for a completed job as a PDF file

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Content Generation","description":"Operations for generating content and managing generation jobs"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/downloadPdf/{jobId}":{"get":{"summary":"Download generated content as PDF","description":"Downloads the generated content for a completed job as a PDF file","tags":["Content Generation"],"parameters":[{"in":"path","name":"jobId","required":true,"schema":{"type":"string","format":"uuid"},"description":"ID of the completed job"}],"responses":{"200":{"description":"PDF file","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Job not found or not completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Preview generated content as PDF

> Previews the generated content for a completed job as a PDF in the browser

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Content Generation","description":"Operations for generating content and managing generation jobs"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/previewPdf/{jobId}":{"get":{"summary":"Preview generated content as PDF","description":"Previews the generated content for a completed job as a PDF in the browser","tags":["Content Generation"],"parameters":[{"in":"path","name":"jobId","required":true,"schema":{"type":"string","format":"uuid"},"description":"ID of the completed job"}],"responses":{"200":{"description":"PDF file for preview","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Job not found or not completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


# Project Management

Operations for managing projects and project data

## Fetch user documents

> Retrieves a list of documents (jobs and projects) for the authenticated user.\
> Returns job-based data with project information included.<br>

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Project Management","description":"Operations for managing projects and project data"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"DocumentResponse":{"type":"object","description":"Combined job and project data for dashboard display","properties":{"id":{"type":"string","format":"uuid","description":"The job ID (primary identifier)"},"projectId":{"type":"string","format":"uuid","description":"The associated project ID"},"jobId":{"type":"string","format":"uuid","description":"The job ID (same as id, for compatibility)"},"title":{"type":"string","description":"The title of the document/project"},"status":{"type":"string","enum":["draft","in_progress","completed","failed","moderated"],"description":"The current status of the job"},"progress":{"type":"number","format":"float","minimum":0,"maximum":100,"description":"The completion progress"},"is_starred":{"type":"boolean","description":"Whether the document is starred"},"created_at":{"type":"string","format":"date-time","description":"When the job was created"},"updated_at":{"type":"string","format":"date-time","description":"When the job was last updated"}},"required":["id","projectId","jobId","title","status","created_at","updated_at"]},"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/fetchDocuments":{"get":{"summary":"Fetch user documents","description":"Retrieves a list of documents (jobs and projects) for the authenticated user.\nReturns job-based data with project information included.\n","tags":["Project Management"],"responses":{"200":{"description":"Documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentResponse"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Duplicate an existing project

> Creates a copy of an existing project with all its settings and files

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Project Management","description":"Operations for managing projects and project data"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/duplicateProject":{"post":{"summary":"Duplicate an existing project","description":"Creates a copy of an existing project with all its settings and files","tags":["Project Management"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","format":"uuid","description":"ID of the project to duplicate"}}}}}},"responses":{"200":{"description":"Project duplicated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"ID of the newly created duplicate project"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Star or unstar a document

> Toggles the starred status of a document (job)

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Project Management","description":"Operations for managing projects and project data"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/starDocument":{"post":{"summary":"Star or unstar a document","description":"Toggles the starred status of a document (job)","tags":["Project Management"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jobId"],"properties":{"jobId":{"type":"string","format":"uuid","description":"ID of the job to star/unstar"}}}}}},"responses":{"200":{"description":"Document starred/unstarred successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


# Job Management

Operations for tracking and managing generation jobs

## Get job status

> Retrieves detailed information about a specific job including status and progress

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Job Management","description":"Operations for tracking and managing generation jobs"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Job":{"type":"object","description":"Represents a content generation job with comprehensive tracking information","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier for the job"},"user_id":{"type":"string","format":"uuid","description":"The ID of the user who owns the job"},"project_id":{"type":"string","format":"uuid","description":"The ID of the project associated with the job"},"status":{"type":"string","enum":["draft","queued","in_progress","completed","failed","cancelled","submitted","moderated"],"description":"The current status of the job"},"progress":{"type":"number","format":"float","minimum":0,"maximum":100,"description":"The completion progress of the job (0 to 100)"},"progress_stage":{"type":"string","description":"A textual description of the current processing stage"},"percent_complete":{"type":"number","format":"float","minimum":0,"maximum":100,"description":"Percentage completion of the job"},"title":{"type":"string","description":"The title of the job/project","nullable":true},"is_byok":{"type":"boolean","description":"Whether the job uses Bring Your Own Key (user's API key)","default":false},"reasoning_model":{"type":"string","description":"The AI model used for reasoning tasks","nullable":true},"writing_model":{"type":"string","description":"The AI model used for writing tasks","nullable":true},"function_model":{"type":"string","description":"The AI model used for function calling","nullable":true},"error_message":{"type":"string","description":"Error message if the job failed","nullable":true},"is_starred":{"type":"boolean","description":"Whether the job is starred by the user","default":false},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the job was created"},"updated_at":{"type":"string","format":"date-time","description":"Timestamp when the job was last updated"}},"required":["id","user_id","project_id","status","created_at","updated_at"]},"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/getJobStatus":{"get":{"summary":"Get job status","description":"Retrieves detailed information about a specific job including status and progress","tags":["Job Management"],"parameters":[{"in":"query","name":"jobId","required":true,"schema":{"type":"string","format":"uuid"},"description":"ID of the job to retrieve"}],"responses":{"200":{"description":"Job status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Cancel a running job

> Cancels a job that is currently in progress or queued

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Job Management","description":"Operations for tracking and managing generation jobs"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/cancelJob":{"post":{"summary":"Cancel a running job","description":"Cancels a job that is currently in progress or queued","tags":["Job Management"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jobId"],"properties":{"jobId":{"type":"string","format":"uuid","description":"ID of the job to cancel"}}}}}},"responses":{"200":{"description":"Job cancelled successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


# User Management

Operations for user authentication and account management

## Generate a new API key

> Generates a new API key for the authenticated user (replaces existing key)

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"User Management","description":"Operations for user authentication and account management"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/generateApiKey":{"post":{"summary":"Generate a new API key","description":"Generates a new API key for the authenticated user (replaces existing key)","tags":["User Management"],"responses":{"200":{"description":"API key generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string","description":"The generated API key (only returned once)"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get API key status

> Checks if the user has an API key and returns its creation date

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"User Management","description":"Operations for user authentication and account management"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/apiKeyStatus":{"get":{"summary":"Get API key status","description":"Checks if the user has an API key and returns its creation date","tags":["User Management"],"responses":{"200":{"description":"API key status retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"hasApiKey":{"type":"boolean","description":"Whether the user has an API key"},"createdAt":{"type":"string","format":"date-time","description":"When the API key was created (if it exists)","nullable":true}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Submit and validate user API key

> Validates and stores a user's external API key (e.g., OpenRouter)

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"User Management","description":"Operations for user authentication and account management"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/submitApiKey":{"post":{"summary":"Submit and validate user API key","description":"Validates and stores a user's external API key (e.g., OpenRouter)","tags":["User Management"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["apiKey"],"properties":{"apiKey":{"type":"string","description":"The API key to validate and store"}}}}}},"responses":{"200":{"description":"API key validated and stored successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


# File Management

Operations for uploading and managing project files

## Upload multiple files to a project with enhanced support

> Uploads one or more files to be associated with a project for research and content generation purposes.\
> \
> \*\*Enhanced Features:\*\*\
> \- Support for 20+ file types including PDF, Word, TXT, Markdown, Python, JSON, XML, CSV, HTML, TEX, JavaScript, C, YAML, TOML, and more\
> \- Multi-file upload support (single or multiple files per request)\
> \- Advanced validation with detailed error reporting\
> \- Automatic duplicate detection and prevention\
> \- Comprehensive response formatting with upload summary\
> \- Secure file storage with unique naming and proper cleanup on errors\
> \
> \*\*File Type Support:\*\*\
> PDF, Word Documents, Text Files, Markdown, Python Scripts, JSON Data, XML Documents,\
> CSV Files, HTML Files, TEX/LaTeX, JavaScript, C Source Code, YAML Configuration,\
> TOML Configuration, Jupyter Notebooks, RSS/Atom Feeds, SVG Images, and more.\
> \
> \*\*Upload Limits:\*\*\
> \- Maximum file size: 50MB per file\
> \- No limit on number of files per request\
> \- Automatic validation and error reporting for each file<br>

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"File Management","description":"Operations for uploading and managing project files"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"ProjectFile":{"type":"object","description":"Represents a file uploaded to a project","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier for the file"},"project_id":{"type":"string","format":"uuid","description":"The ID of the project this file belongs to"},"file_name":{"type":"string","description":"The original name of the uploaded file"},"file_size":{"type":"number","description":"The size of the file in bytes"},"file_type":{"type":"string","description":"The MIME type of the file"},"storage_path":{"type":"string","description":"The path where the file is stored"},"created_at":{"type":"string","format":"date-time","description":"When the file was uploaded"},"updated_at":{"type":"string","format":"date-time","description":"When the file was last updated"}},"required":["id","project_id","file_name","file_size","file_type","storage_path","created_at","updated_at"]},"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/uploadProjectFiles":{"post":{"summary":"Upload multiple files to a project with enhanced support","description":"Uploads one or more files to be associated with a project for research and content generation purposes.\n\n**Enhanced Features:**\n- Support for 20+ file types including PDF, Word, TXT, Markdown, Python, JSON, XML, CSV, HTML, TEX, JavaScript, C, YAML, TOML, and more\n- Multi-file upload support (single or multiple files per request)\n- Advanced validation with detailed error reporting\n- Automatic duplicate detection and prevention\n- Comprehensive response formatting with upload summary\n- Secure file storage with unique naming and proper cleanup on errors\n\n**File Type Support:**\nPDF, Word Documents, Text Files, Markdown, Python Scripts, JSON Data, XML Documents,\nCSV Files, HTML Files, TEX/LaTeX, JavaScript, C Source Code, YAML Configuration,\nTOML Configuration, Jupyter Notebooks, RSS/Atom Feeds, SVG Images, and more.\n\n**Upload Limits:**\n- Maximum file size: 50MB per file\n- No limit on number of files per request\n- Automatic validation and error reporting for each file\n","tags":["File Management"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","format":"uuid","description":"ID of the project to associate files with"},"files":{"type":"array","items":{"type":"string","format":"binary"},"description":"Multiple files to upload (alternative to single file)"},"file":{"type":"string","format":"binary","description":"Single file to upload (alternative to files array)"}}}}}},"responses":{"200":{"description":"All files uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Database ID of the uploaded file"},"file_name":{"type":"string","description":"Original filename"},"file_type":{"type":"string","description":"MIME type of the file"},"file_size":{"type":"number","description":"File size in bytes"},"file_url":{"type":"string","description":"Public URL for accessing the file"},"storage_path":{"type":"string","description":"Internal storage path in Supabase"},"uploaded_at":{"type":"string","format":"date-time","description":"Upload timestamp"}}}},"summary":{"type":"object","properties":{"total_files":{"type":"number","description":"Total number of files processed"},"successful_uploads":{"type":"number","description":"Number of successfully uploaded files"},"failed_uploads":{"type":"number","description":"Number of failed uploads"},"errors":{"type":"array","items":{"type":"object","properties":{"file_name":{"type":"string"},"error":{"type":"string"}}},"description":"List of any upload errors (empty if all successful)"}}}}}}}},"207":{"description":"Multi-Status - Some files uploaded successfully, some failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"files":{"type":"array","items":{"$ref":"#/components/schemas/ProjectFile"}},"summary":{"type":"object","properties":{"total_files":{"type":"number"},"successful_uploads":{"type":"number"},"failed_uploads":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"file_name":{"type":"string"},"error":{"type":"string"}}}}}}}}}}},"400":{"description":"Bad Request - No files uploaded or all uploads failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"string"}},"summary":{"type":"object","properties":{"total_files":{"type":"number"},"successful_uploads":{"type":"number"},"failed_uploads":{"type":"number"},"errors":{"type":"array","items":{"type":"object"}}}}}}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}}}},"404":{"description":"Project not found or access denied","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large - Exceeds 50MB limit","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}}}},"415":{"description":"Unsupported file type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}}}}}}}}}
```

## Get files associated with a project

> Retrieves a list of all files uploaded to a specific project

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"File Management","description":"Operations for uploading and managing project files"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"ProjectFile":{"type":"object","description":"Represents a file uploaded to a project","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier for the file"},"project_id":{"type":"string","format":"uuid","description":"The ID of the project this file belongs to"},"file_name":{"type":"string","description":"The original name of the uploaded file"},"file_size":{"type":"number","description":"The size of the file in bytes"},"file_type":{"type":"string","description":"The MIME type of the file"},"storage_path":{"type":"string","description":"The path where the file is stored"},"created_at":{"type":"string","format":"date-time","description":"When the file was uploaded"},"updated_at":{"type":"string","format":"date-time","description":"When the file was last updated"}},"required":["id","project_id","file_name","file_size","file_type","storage_path","created_at","updated_at"]},"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/getProjectFiles":{"get":{"summary":"Get files associated with a project","description":"Retrieves a list of all files uploaded to a specific project","tags":["File Management"],"parameters":[{"in":"query","name":"projectId","required":true,"schema":{"type":"string","format":"uuid"},"description":"ID of the project to get files for"}],"responses":{"200":{"description":"Project files retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectFile"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Delete a project file

> Removes a file from a project and deletes it from storage

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"File Management","description":"Operations for uploading and managing project files"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"apiKey":[]},{"bearerAuth":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for external service authentication."},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/deleteProjectFile":{"delete":{"summary":"Delete a project file","description":"Removes a file from a project and deletes it from storage","tags":["File Management"],"parameters":[{"in":"query","name":"fileId","required":true,"schema":{"type":"string","format":"uuid"},"description":"ID of the file to delete"}],"responses":{"200":{"description":"File deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"File not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


# Subscription Management

Operations for managing user subscriptions and billing

## Get user subscription details

> Retrieves the current subscription information for the authenticated user

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Subscription Management","description":"Operations for managing user subscriptions and billing"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Subscription":{"type":"object","description":"Represents a user's subscription plan and usage","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier for the subscription"},"user_id":{"type":"string","format":"uuid","description":"The ID of the user who owns the subscription"},"status":{"type":"string","enum":["active","inactive","cancelled","past_due"],"description":"The current status of the subscription"},"plan_name":{"type":"string","description":"The name of the subscription plan"},"generations_limit":{"type":"number","description":"Maximum number of generations allowed"},"generations_used":{"type":"number","description":"Number of generations used in current period"},"pages_limit":{"type":"number","description":"Maximum number of pages allowed"},"pages_used":{"type":"number","description":"Number of pages used in current period"},"stripe_subscription_id":{"type":"string","description":"Stripe subscription identifier","nullable":true},"current_period_start":{"type":"string","format":"date-time","description":"Start of the current billing period","nullable":true},"current_period_end":{"type":"string","format":"date-time","description":"End of the current billing period","nullable":true},"created_at":{"type":"string","format":"date-time","description":"When the subscription was created"},"updated_at":{"type":"string","format":"date-time","description":"When the subscription was last updated"}},"required":["id","user_id","status","generations_limit","generations_used","pages_limit","pages_used","created_at","updated_at"]},"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/getSubscription":{"get":{"summary":"Get user subscription details","description":"Retrieves the current subscription information for the authenticated user","tags":["Subscription Management"],"responses":{"200":{"description":"Subscription details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No active subscription found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


# DeepWriter MCP

## Using DeepWriter MCP

The DeepWriter Model Context Protocol (MCP) server allows you to seamlessly integrate DeepWriter's content generation capabilities with Claude and other MCP-compatible AI assistants. This guide will help you set up and use the DeepWriter MCP server.

### Prerequisites

Before getting started, ensure you have:

* Node.js (v17 or higher)
* npm (v6 or higher)
* A DeepWriter API key [(see Getting Your API Key)](/api-access/getting-started)
* An MCP-compatible client (such as Claude for Desktop)

### Installation

1. Clone the repository:

   ```bash
   bashgit clone https://github.com/yourusername/deepwriter-mcp.gitcd deepwriter-mcp
   ```
2. Install dependencies:

   ```bash
   bashnpm install
   ```
3. Create a `.env` file in the root directory with your DeepWriter API key:

   ```
   DEEPWRITER_API_KEY=your_api_key_here
   ```
4. Build the project:

   ```bash
   bashnpm run build
   ```

### Integration with Claude for Desktop

To connect the DeepWriter MCP server with Claude for Desktop:

1. Open your Claude for Desktop configuration file:
   * macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
   * Windows: `%APPDATA%\Claude\claude_desktop_config.json`
2. Add the server configuration:

   ```json
   json{  "mcpServers": {    "deepwriter": {      "command": "node",      "args": ["/ABSOLUTE/PATH/TO/deepwriter-mcp/build/index.js"],      "env": {        "DEEPWRITER_API_KEY": "your_api_key_here"      }    }  }}
   ```
3. Restart Claude for Desktop to load the new configuration.

### Using DeepWriter Tools with Claude

Once you've set up the MCP server, you can use DeepWriter's features directly within Claude. Here are some examples:

#### Listing Your Projects

To see all your DeepWriter projects, ask Claude:

```
Can you list all my Deepwriter projects?
```

Claude will use the `listProjects` tool to fetch and display your projects.

#### Creating a New Project

To create a new project, you can say:

```
Create a new Deepwriter project titled "My Science Fiction Novel" with my email address user@example.com
```

Claude will use the `createProject` tool to set up your new project.

#### Getting Project Details

To view details about a specific project:

```
Show me the details for my Deepwriter project with ID "proj_123456"
```

Claude will retrieve the project information using the `getProjectDetails` tool.

#### Updating a Project

To update an existing project:

```
Update my Deepwriter project "proj_123456" to change the title to "New Title" and add the following prompt: "Write a story about space explorers discovering a new planet"
```

Claude will use the `updateProject` tool to modify your project.

#### Generating Content

To generate content for a project:

```
Generate content for my Deepwriter project "proj_123456"
```

Claude will use the `generateWork` tool to create new content based on your project settings.

#### Deleting a Project

To delete a project:

```
Delete my Deepwriter project with ID "proj_123456"
```

Claude will confirm and then use the `deleteProject` tool to remove the project.

### Troubleshooting

#### Common Issues

1. **API Key Problems**:
   * Ensure your DeepWriter API key is correctly set in both the `.env` file and Claude configuration
   * Verify the API key has not expired (remember, keys are only viewable on creation)
2. **Connection Issues**:
   * Check that your MCP server is running before trying to use it with Claude
   * Verify the path to your build directory is correct in the Claude configuration
3. **Tool Execution Errors**:
   * Double-check parameter names and formats when making requests
   * Ensure project IDs are valid when referencing existing projects

#### Debugging

For additional debugging information, run the server with the DEBUG environment variable:

```bash
bashDEBUG=deepwriter-mcp:* node build/index.js
```

You can also check Claude for Desktop logs at:

* macOS: `~/Library/Logs/Claude/mcp*.log`
* Windows: `%APPDATA%\Claude\logs\mcp*.log`

### Advanced Usage

#### Using Environment Variables

Instead of hardcoding your API key in the Claude configuration, you can reference environment variables:

```json
json{  "mcpServers": {    "deepwriter": {      "command": "node",      "args": ["/path/to/deepwriter-mcp/build/index.js"],      "env": {        "DEEPWRITER_API_KEY": "${DEEPWRITER_API_KEY}"      }    }  }}
```

This approach allows you to manage sensitive credentials more securely.

#### Batch Operations

You can perform batch operations by asking Claude to execute multiple actions in sequence:

```
First, list all my DeepWriter projects. Then, create a new project called "Marketing Content" with my email user@example.com.
```

Claude will execute these operations in order and provide the results of each.

### Next Steps

* Explore the [Deepwriter API documentation](https://deepwriter.com/docs) for more advanced features
* Check the [GitHub repository](https://github.com/yourusername/deepwriter-mcp) for updates and new features
* Join the community on Discord to share tips and get help from other users


