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

# Go live

> Check your integration, then switch to production and authorize Thrad in ads.txt.

## Staging vs. production

You build with your staging key. When you swap in the production key, two things change:

| | Staging key | Production key |
| - | - | - |
| Use it for | Development and testing | Your live app |
| Ads returned | On **every** request, so you can test rendering | Only when an advertiser wins the auction, so `bids` may be empty |
| Counts toward revenue | No | Yes |
| Trackers | 4 test pixels per bid: 2 `rendered`, 2 `viewable`. We log each hit, but nothing is counted or shown on Health | Real pixels, counted and shown on Health |

## Check before you switch

Three checks with your staging key. The first one the API does for you. The other two it can't: they decide how well ads match and whether you get paid.

**1. Validation: the request is complete**

Every request returns `200` with a bid and nothing logs `invalid_request`. Beyond that, check the fields the API accepts but can't judge:

* `device.geo.country` is on every request. **This matters most:** without the country, every campaign that targets one is skipped. `device.ip` is only the fallback.
* `device.type` and `device.os` are on every request. `device.user_agent` is only the fallback.
* `device.ip` and `device.user_agent` are the **end user's**, never your server's. Every impression is matched against them: see [Impression Billing](https://docs.thrad.ai/api/guides/billing-viewability.md#invalid-traffic).
* `user.id` is the same on every request in a session, and across sessions where you can. See [User & Chat Identification](https://docs.thrad.ai/api/guides/user-identification-v2.md).
* `context.id` is on every conversation request, and stays the same for the whole chat.
* Trackers fire: all 4 on every staging bid, each at its `event`. A bid can carry more than one pixel per event, so fire every one.

**2. Quality: what you send is worth matching on**

The auction picks ads from what you describe. A vague description matches vague ads, or none. Read a few real requests and check:

* **`context.summary` is specific.** "User is choosing trail-running shoes for a first ultra, asked about grip and drainage" targets. "User is chatting about sport" doesn't.
* **The latest message has PII masked.** Names, emails, phone numbers, addresses, account numbers. Mask before you send; nothing on our side does it for you.
* **`user.summary` says who this person is**, in a line: their profession, interests, current situation and preferences, in whatever shape you have them. No names, contact details or identifiers. For example:

  > Software engineer, into trail running and coffee gear, training for a first marathon, prefers mid-range brands and buys online.

**3. Health: the trackers land**

> [!NOTE]
>
> Staging pixels don't reach the Health page. On staging, email **[contact@thrad.ai](mailto:contact@thrad.ai)** and we'll confirm from our logs that all 4 pixels fired for your bids. Health fills in once production traffic runs.

Open your publisher's **Health** page on the [Thrad Platform](https://platform.thrad.ai). Both numbers cover the last 24 hours.

![The Health page with Ping Health and View Rate Health cards](https://mintcdn.com/thrads-5feffa3d/UvVeeQ-cfuN6oQz5/images/publisher_health.png?fit=max\&auto=format\&n=UvVeeQ-cfuN6oQz5\&q=85\&s=e25bec0c5755e300f004903e17f081d4)

Health → Overview

* **Ping Health** is tracker calls that confirmed an impression, over all tracker calls we received from you. A call fails when it arrives twice or late, its token has expired or is invalid, the end-user headers are missing, or the payload is gone. Expect close to 100%. Under 30% shows Unhealthy. A low ping rate means the integration fires wrong, not that users aren't looking.
* **View Rate Health** is impressions you rendered, over all impressions we served you. It drops when you draw ads users never see, or don't fire the `viewable` pixel. At or above 80% is Healthy, 20 to 80% Suboptimal, under 20% Unhealthy. A healthy ping rate with a low view rate is placement, not code: see [Impression Billing](https://docs.thrad.ai/api/guides/billing-viewability.md).

The **Event Stream** tab lists every ping with its outcome, so a failing one tells you why.

## Switch to production

**1. Get your production key**

Email **[contact@thrad.ai](mailto:contact@thrad.ai)** for your **production API key**, then swap it in for the staging key.

**2. Add Thrad to your ads.txt**

Ad buyers check your [`ads.txt`](https://iabtechlab.com/ads-txt/) before they bid, to confirm Thrad may sell your ad space. Without this line, bids on your inventory may be filtered out.

Add this line to `https://yourdomain.com/ads.txt`. For a mobile app, add it to `app-ads.txt` on the developer website listed in your app store page.

```
thrad.ai, <YOUR_ORGANIZATION_ID>, DIRECT
```

Replace `<YOUR_ORGANIZATION_ID>` with your **Organization ID**. On the [Thrad Platform](https://platform.thrad.ai), open your publisher, then **Configuration → Keys**: it's the second row of the Identifiers panel, with a copy button next to it. Not the Publisher ID in the row above: that identifies one property to us, while buyers verify the organization that owns it, which is what we publish in [sellers.json](https://thrad.ai/sellers.json).

![The Identifiers panel on the publisher's Keys tab, with the Organization ID row highlighted](https://mintcdn.com/thrads-5feffa3d/iVA9VngC2jL204Cs/images/organization_id.png?fit=max\&auto=format\&n=iVA9VngC2jL204Cs\&q=85\&s=6adb6d084b556a7ebf72b6d04b974b77)

Configuration → Keys → Identifiers → Organization ID

> [!NOTE]
>
> One organization, one line. If you run several properties (a website and an app, or several apps), every `ads.txt` and `app-ads.txt` carries the same line. The domain is `thrad.ai`, with no `s`: buyers fetch `sellers.json` from the domain you write, and a redirect doesn't count.

The file has to be plain text. A single-page app that answers every path with its HTML shell serves `/ads.txt` as a web page, which buyers read as no file at all; put it in the static directory (`public/` in Next.js) so the path returns the text itself.

Ad networks can take 24–48 hours to pick up the change.

## Next steps

> [card] [Revenue & Metrics](https://docs.thrad.ai/insights/overview.md)
>
> You're live: track impressions, revenue, and fill rate.

> [card] [Talk to us](mailto:contact@thrad.ai)
>
> Questions about going live? Email us.

Need exact fields? The [API Reference](https://docs.thrad.ai/api/api-reference/bid-request-v2.md) has every request and response.


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