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

# Quickstart

> Publish your first post in under 5 minutes.

## Prerequisites

* An account at [autoposting.ai](https://autoposting.ai)
* A social account on X, LinkedIn, Instagram, Threads, or YouTube

<Warning>
  Keep your API key secret. Never commit it to version control or expose it in client-side code.
</Warning>

<Steps>
  <Step title="Sign up">
    Create your account at [autoposting.ai](https://autoposting.ai). All plans include a **3-day free trial** — no credit card required.
  </Step>

  <Step title="Get your API key">
    Go to **Settings → API Keys** in the dashboard and create a new key. Copy it immediately — the full value is shown only once.

    ```bash theme={null}
    export AUTOPOSTING_API_KEY=sk-social-your-key
    ```
  </Step>

  <Step title="Choose your method">
    <Tabs>
      <Tab title="CLI">
        Install the CLI and publish your first post:

        ```bash theme={null}
        npm install -g @autoposting.ai/cli

        # Create a post
        ap posts create --brand my-brand --text "Hello from Autoposting!" --platforms x,linkedin

        # Publish it
        ap posts publish <post-id>
        ```
      </Tab>

      <Tab title="TypeScript SDK">
        Install the SDK and publish programmatically:

        ```bash theme={null}
        npm install @autoposting.ai/sdk
        ```

        ```typescript theme={null}
        import { Autoposting } from '@autoposting.ai/sdk'

        const client = new Autoposting({ apiKey: process.env.AUTOPOSTING_API_KEY })

        const post = await client.posts.create({
          brandSlug: 'my-brand',
          text: 'Hello from Autoposting!',
          platforms: ['x', 'linkedin'],
        })

        await client.posts.publish(post.id)
        ```
      </Tab>

      <Tab title="cURL">
        ```bash theme={null}
        # Create a post
        curl -X POST https://app.autoposting.ai/api-proxy/posts \
          -H "Authorization: Bearer $AUTOPOSTING_API_KEY" \
          -H "Content-Type: application/json" \
          -d '{"brandSlug": "my-brand", "text": "Hello from Autoposting!", "platforms": ["x", "linkedin"]}'

        # Publish it (use the _id from above)
        curl -X POST https://app.autoposting.ai/api-proxy/posts/<post-id>/publish \
          -H "Authorization: Bearer $AUTOPOSTING_API_KEY"
        ```
      </Tab>

      <Tab title="MCP (AI Agent)">
        Add to your Claude Desktop config and ask Claude to post for you:

        ```json theme={null}
        {
          "mcpServers": {
            "autoposting": {
              "command": "ap",
              "args": ["mcp"],
              "env": { "AUTOPOSTING_API_KEY": "sk-social-your-key" }
            }
          }
        }
        ```

        Then tell Claude: *"Create a post on my-brand saying 'Hello from Autoposting!' and publish it to X and LinkedIn."*
      </Tab>
    </Tabs>

    <Check>
      Post published. Verify in your dashboard or with `ap posts show <post-id>`.
    </Check>
  </Step>

  <Step title="Next steps">
    <CardGroup cols={2}>
      <Card title="Authentication" icon="lock" href="/authentication">
        API keys, scopes, and rate limiting.
      </Card>

      <Card title="Core Concepts" icon="book" href="/concepts/brands">
        Brands, Posts, Platforms, Clips, and Agents explained.
      </Card>

      <Card title="CLI Commands" icon="terminal" href="/cli/commands">
        Full reference for all 61 CLI commands.
      </Card>

      <Card title="MCP Server" icon="robot" href="/mcp/overview">
        51 tools for Claude and AI assistants.
      </Card>
    </CardGroup>
  </Step>
</Steps>
