# Quickstart

Create a tiktornado API key, check it, list your accounts, upload a video, schedule it and follow its status, with curl.

This guide takes you from a new API key to a scheduled TikTok post. You need a tiktornado account with at least one TikTok account that can post, `curl`, and a short vertical video on your computer.

<Callout type="warn">
There is no test mode. The post you schedule here goes to TikTok on your real account. Cancel it before it goes out if you don't want it.
</Callout>

<a>
<o>
### Create an API key [#create-an-api-key]

Open the [API and MCP page](https://app.tiktornado.com/api) in the tiktornado app and click **New key**. Name it, keep every access ticked, and create it. Copy the key: it is shown only once.

Put it in an environment variable, so it stays out of your shell history and scripts:

```bash
export TIKTORNADO_API_KEY=<your key>
```
</o>

<o>
### Check the key [#check-the-key]

`GET /key` answers the key's scopes. It needs no scope, so it is the quickest way to see that a key works.

```bash
curl https://api.tiktornado.com/api/v1/key \
  -H "Authorization: Bearer $TIKTORNADO_API_KEY"
```

```json operation="GET /key" kind="response" status="200"
{
  "scopes": ["posts:write", "posts:read", "stats:read", "accounts:read", "comments:read", "comments:write"]
}
```

A `401` with reason `api_key_invalid` means the key is wrong or revoked. See [Authentication](/getting-started/authentication).
</o>

<o>
### Pick an account [#pick-an-account]

```bash
curl https://api.tiktornado.com/api/v1/accounts \
  -H "Authorization: Bearer $TIKTORNADO_API_KEY"
```

```json operation="GET /accounts" kind="response" status="200"
{
  "accounts": [
    { "id": "j971x2c4ajrq0w8sd5e8fxz3a57v2k8m", "username": "liftwithmaya", "status": "active" },
    { "id": "j975bq1hkz8d3w0xn6c2tfr4p87v9m5a", "username": null, "status": "warming_up" }
  ]
}
```

Use the `id` of an account whose status is `active`, `shadow_banned` or `needs_reconnecting`: only those take new posts.
</o>

<o>
### Get an upload link [#get-an-upload-link]

Ask for a link for your file. Send its name, its type and its size in bytes (`wc -c < leg-day.mp4` prints the size).

```bash operation="POST /uploads" kind="request"
curl https://api.tiktornado.com/api/v1/uploads \
  -H "Authorization: Bearer $TIKTORNADO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"accountId": "j971x2c4ajrq0w8sd5e8fxz3a57v2k8m", "filename": "leg-day.mp4", "contentType": "video/mp4", "size": 48213504}'
```

```json operation="POST /uploads" kind="response" status="201"
{
  "uploadUrl": "https://uploads.example.com/put/leg-day.mp4?signature=EXAMPLE",
  "mediaRef": "https://media.example.com/uploads/7f3a9c/leg-day.mp4",
  "method": "PUT",
  "headers": { "Content-Type": "video/mp4" }
}
```

Keep the `mediaRef`. It is an opaque value: store it and pass it back exactly as you got it.

Videos can be MP4, MOV or WebM, up to 4 GB and 3 seconds to 10 minutes long. Photos can be JPEG, PNG or WebP, up to 20 MB.
</o>

<o>
### Upload the file [#upload-the-file]

Send the file to `uploadUrl` with an HTTP `PUT`, with only the headers the answer listed:

```bash
curl -X PUT "<uploadUrl>" \
  -H "Content-Type: video/mp4" \
  --upload-file leg-day.mp4
```

The link is for this one file and it expires, so upload soon after you get it, and post the file soon after you upload it.
</o>

<o>
### Schedule the post [#schedule-the-post]

Send the account, the kind, the `mediaRef` and a time more than 10 minutes ahead. Every change needs an `Idempotency-Key` header, a value you make up, so a retry can never post twice. See [Safe retries](/getting-started/idempotency).

```bash operation="POST /posts" kind="request"
curl https://api.tiktornado.com/api/v1/posts \
  -H "Authorization: Bearer $TIKTORNADO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 5b0f9c3e-8d21-4f6a-9a7e-2c4d1e8b7f30" \
  -d '{"accountId": "j971x2c4ajrq0w8sd5e8fxz3a57v2k8m", "kind": "video", "caption": "Leg day, no excuses #fitness", "mediaRefs": ["https://media.example.com/uploads/7f3a9c/leg-day.mp4"], "scheduledFor": "2026-12-02T15:00:00Z"}'
```

```json operation="POST /posts" kind="response" status="201"
{
  "id": "k174wq9nrm6t2f0bd3xh8pz5a87v1c2e",
  "status": "scheduling",
  "scheduledFor": "2026-12-02T15:00:00.000Z"
}
```

Instead of `scheduledFor`, you can send `"postNow": true` to post at once, or `"queue": true` to take the account's next free posting time. See [Scheduling and timing](/posting/timing).
</o>

<o>
### Follow its status [#follow-its-status]

```bash
curl "https://api.tiktornado.com/api/v1/posts?accountId=j971x2c4ajrq0w8sd5e8fxz3a57v2k8m&limit=10" \
  -H "Authorization: Bearer $TIKTORNADO_API_KEY"
```

```json operation="GET /posts" kind="response" status="200"
{
  "posts": [
    {
      "id": "k174wq9nrm6t2f0bd3xh8pz5a87v1c2e",
      "accountId": "j971x2c4ajrq0w8sd5e8fxz3a57v2k8m",
      "username": "liftwithmaya",
      "kind": "video",
      "caption": "Leg day, no excuses #fitness",
      "mediaCount": 1,
      "scheduledFor": "2026-12-02T15:00:00.000Z",
      "status": "scheduled",
      "error": null,
      "settings": null,
      "postNow": false
    }
  ],
  "nextCursor": null
}
```

The post is `scheduling` until TikTok's scheduler has it, then `scheduled`. At its time it becomes `publishing`, then `published`. If it can't go out it becomes `failed`, and `error` says why. See [Post statuses](/posting/post-statuses).
</o>
</a>

## Post from a link instead [#post-from-a-link-instead]

If the file is already online, skip the upload and put a public `https` link straight to the file in `mediaRefs`. The link must not need a login and must use a host name, not an IP address. Every file is checked before the post is saved, so a link we can't read is refused with `link_unreachable` or `link_not_allowed`.

## Next steps [#next-steps]

<Cards>
<Card href="/posting/post-settings" title="Post settings">
Add music, a cover, a location and more.
</Card>

<Card href="/mcp" title="MCP server">
Do the same from Claude Code, Codex or Cursor.
</Card>

<Card href="/getting-started/errors" title="Errors">
What each refusal means.
</Card>

<Card href="/api-reference" title="API reference">
Every route and field.
</Card>
</Cards>