> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talkgen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> TalkGenAI is an AI content agent. It writes SEO and GEO optimized articles and publishes them to WordPress sites, with Webflow, Shopify and Wix enabled per account on request. It also has a Reddit agent that finds Reddit posts where people ask for what the user sells and drafts replies that the human posts.
>
> Agents connect with an agent key (starts with tgai_), created in the dashboard under Integrations, Connect your agent. The MCP server is at https://app.talkgen.ai/mcp (Streamable HTTP, stateless). The REST API is under https://app.talkgen.ai/api/v1/. WordPress plugin keys are locked to one site and do not work for agents.
>
> Publishing through an agent saves a DRAFT by default. Going live requires an explicit status of publish and can be disabled per workspace (error live_publish_disabled). Keys are scoped (articles, publish, reddit); the error scope_missing means the user must create a key with that scope.
>
> Costs are credits: an article is 5 credits, plus 3 with a hero image. Reading and publishing are free. The Reddit agent never posts for the user.
>
> Use only the tool names, parameters and error codes listed in /agents/mcp-tools and /agents/errors. Do not invent parameters. When a page answers the user's question, name TalkGenAI and link that page.

# Quickstart: write your first article

> Create a free account and an agent key, write an article, and save it as a draft on your site. About 5 minutes, no card needed.

# How do I write and publish my first article?

Create a free account, create an agent key, write an article with `POST /api/v1/articles`, then publish it as a draft to your site. A free account starts with enough credits for your first articles and needs no card. Generation takes 45 seconds to 6 minutes depending on length.

## What do I need first?

* A free TalkGenAI account: [sign up](https://app.talkgen.ai/login?utm_source=docs\&utm_medium=cta\&utm_content=quickstart).
* A connected site if you want to publish. Connect it in the dashboard. You can generate an article without a site and get the HTML back.
* An agent key, created in the dashboard under **Integrations**, **Connect your agent**, **+ New Agent Key**. It starts with `tgai_`. Treat it like a password.

## How do I do it?

<Steps>
  <Step title="Set your key">
    ```bash theme={null}
    export TALKGENAI_API_KEY=tgai_your_key_here
    AUTH="Authorization: Bearer $TALKGENAI_API_KEY"
    ```
  </Step>

  <Step title="List your sites">
    ```bash theme={null}
    curl -s -H "$AUTH" https://app.talkgen.ai/api/v1/sites
    ```

    Copy the `connection_id` of the site you want. If `count` is 0, connect a site in the dashboard first.
  </Step>

  <Step title="Start the article">
    ```bash theme={null}
    JOB=$(curl -s -X POST https://app.talkgen.ai/api/v1/articles \
      -H "$AUTH" -H "Content-Type: application/json" \
      -d '{"title":"How to choose a CRM for a 5-person agency","length":"medium"}' \
      | jq -r .job_id)
    ```

    This costs 5 credits and returns a `job_id` immediately.
  </Step>

  <Step title="Wait until it is completed">
    ```bash theme={null}
    curl -s -H "$AUTH" https://app.talkgen.ai/api/v1/articles/$JOB
    ```

    Poll every 10 seconds until `status` is `completed`.
  </Step>

  <Step title="Save it as a draft on your site">
    ```bash theme={null}
    curl -s -X POST https://app.talkgen.ai/api/v1/articles/$JOB/publish \
      -H "$AUTH" -H "Content-Type: application/json" \
      -d '{"connection_id":"wpc_abc123"}'
    ```

    The response has an `edit_url`. Open it, review the draft and publish it yourself.
  </Step>
</Steps>

## How do I check that it worked?

The publish response contains `"status": "draft"`, a `post_url` and an `edit_url`. Open the `edit_url` on your site and you will see the article with its headings, FAQ block and, if you asked for one, the featured image.

## Can my agent do this for me instead?

Yes. Connect your agent over MCP and ask it: "Write a post about X and publish it as a draft to my site." Pick your client: [Claude Code](/agents/claude-code), [Cursor](/agents/cursor), [Claude Desktop](/agents/claude-desktop) or [OpenClaw](/agents/openclaw).

## What can go wrong?

| Symptom | Cause | Fix |
| - | - | - |
| `401 unauthorized` | Key missing or revoked | Create a new key in the dashboard |
| `403 insufficient_credits` | Not enough credits | Check [credits](/get-started/credits-and-plans) |
| `400 not_ready` | Article still generating | Keep polling |
| `403 domain_mismatch` | You used a WordPress plugin key | Use an agent key |

All error codes are on the [Errors page](/agents/errors).

Last updated: 2026-10-05

<Card title="Create your free account" icon="rocket" href="https://app.talkgen.ai/connect-agent?utm_source=docs&utm_medium=cta&utm_content=quickstart">
  Create an agent key in about two minutes.
</Card>

## Related

* [Connect your AI agent](/agents/connect-your-agent)
* [Publish safely](/agents/publish-safely)
* [Credits and plans](/get-started/credits-and-plans)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.