> ## Documentation Index
> Fetch the complete documentation index at: https://neuraltrust-92b43583-develop.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Create a TrustGate gateway, connect a provider, send a request, and inspect its trace from the NeuralTrust console.

The NeuralTrust SaaS control plane configures TrustGate in both deployment modes:

* **SaaS** — NeuralTrust hosts the data plane. This is the fastest path and requires no
  infrastructure installation.
* **Private (Hybrid)** — you run the data plane in your environment for data residency,
  private networking, deterministic capacity, or production SLA requirements while
  continuing to manage it from the NeuralTrust SaaS console.

<Note>
  Choose **SaaS** for the fastest setup. Choose **Private** for data residency, private
  networking, deterministic capacity, or production SLA requirements.
</Note>

<Steps>
  <Step title="Open Getting started">
    In the NeuralTrust console, open **TrustGate** → **Getting started**.
  </Step>

  <Step title="Add a gateway">
    If you do not have a gateway, **Add new Gateway** opens automatically. Otherwise, open
    the gateway selector and choose **New Gateway**. Enter a **Name** and choose **SaaS**.

    For a Private data plane, choose **Private**, then select **Docker**, **Kubernetes**, or
    **Manual**. Deploy using the generated instructions, enter one bootstrap
    **Dataplane URL**, and select **Save and Finish**. Then open
    **Settings** → **Agent Gateway** → **General** to set or verify the separate **LLM URL**
    and **MCP URL**.

    <Note>
      The generated Docker quick path exposes the LLM/proxy service only. Use Kubernetes or a
      full deployment when you need MCP.
    </Note>

    See [Private deployment](/neuraltrust/deployment/overview) for infrastructure details.
  </Step>

  <Step title="Step 1 · Connect a provider">
    Choose a provider and enter its credentials. Select **Test connection** to verify them,
    then select **Connect**.
  </Step>

  <Step title="Step 2 · Send request">
    Choose one of the provider's models, enter a question, and select **Send request**. The
    console sends the request through the selected gateway.
  </Step>

  <Step title="Step 3 · Traces">
    Review the first trace, including its status, model, latency, token count, trace ID, and
    response. Continue to **Playground**, **Consumer**, or **Security** from the next-step
    cards.
  </Step>
</Steps>

## Call from your application

<Warning>
  The request in **Getting started** uses an internal playground token. It does not create
  a reusable API key for your application.
</Warning>

For production traffic:

1. Open **Consumers**.
2. Select **Consumer**; the **New Consumer** panel opens. You can also open an existing
   consumer.
3. For a new consumer, select **API Key** under **Authentication** and copy the generated
   key when it is shown—it appears only once. For an existing consumer, manage
   credentials under **Auth**.
4. Open **Connect** and use a snippet under **Connection details**.

The provider credential remains in TrustGate. Keep the consumer API key secret and use
placeholders in shared examples.

### SaaS

Use the SaaS gateway URL from **Connection details**. Do not add
`X-AG-Gateway-Slug`.

```bash theme={null}
curl -X POST "https://<gateway-host>/<consumer-slug>/v1/chat/completions" \
  -H "X-AG-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<model>",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

### Private (Hybrid)

Use the configured LLM URL and include the gateway slug:

```bash theme={null}
curl -X POST "<configured-llm-url>/<consumer-slug>/v1/chat/completions" \
  -H "X-AG-Gateway-Slug: <gateway-slug>" \
  -H "X-AG-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<model>",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

<Note>
  Clients that only support a base URL plus an API key (OpenAI- or Anthropic-compatible
  SDKs, Cursor, Claude Desktop-style setups) can send the same `ag_…` key as
  `Authorization: Bearer ag_…` or `x-api-key: ag_…` instead of `X-AG-API-Key`. See
  [Auth](/trustgate/concepts/auth#api-keys).
</Note>

Embeddings use the same host, consumer slug, and key:

```bash theme={null}
curl -X POST "https://<gateway-host>/<consumer-slug>/v1/embeddings" \
  -H "X-AG-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-embedding-3-small",
    "input": ["Hello from TrustGate"]
  }'
```

Providers, routing, and Bedrock / Vertex limits: [Embeddings](/trustgate/endpoints/embeddings).

Images use the same host, consumer slug, and key:

```bash theme={null}
curl -X POST "https://<gateway-host>/<consumer-slug>/v1/images/generations" \
  -H "X-AG-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dall-e-3",
    "prompt": "A minimal TrustGate logo",
    "n": 1,
    "size": "1024x1024"
  }'
```

Providers and multipart edits/variations: [Images](/trustgate/endpoints/images).

Files use the same host, consumer slug, and key:

```bash theme={null}
curl -X POST "https://<gateway-host>/<consumer-slug>/v1/files" \
  -H "X-AG-API-Key: <your-api-key>" \
  -F purpose=assistants \
  -F file=@notes.txt
```

Providers and list/get/content/delete: [Files](/trustgate/endpoints/files).

Rerank (Cohere v2 body) and model discovery:

```bash theme={null}
curl -X POST "https://<gateway-host>/<consumer-slug>/v1/rerank" \
  -H "X-AG-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "rerank-english-v3.0",
    "query": "What is TrustGate?",
    "documents": ["TrustGate is an LLM gateway"]
  }'

curl "https://<gateway-host>/<consumer-slug>/v1/models" \
  -H "X-AG-API-Key: <your-api-key>"
```

[Rerank](/trustgate/endpoints/rerank) · [Models](/trustgate/endpoints/models).

## Next steps

From Getting started **What's next**, open **Playground**, **Consumer**, or **Security**
(policies) — or continue below.

<CardGroup cols={2}>
  <Card title="Endpoints" icon="plug" href="/trustgate/endpoints/chat">
    Every route a client can call through a consumer.
  </Card>

  <Card title="Observability" icon="activity" href="/trustgate/observability/metrics">
    Traces, metrics, and where to inspect past traffic.
  </Card>

  <Card title="Consumers" icon="users" href="/trustgate/concepts/consumers">
    Auth, routing strategies, policies, Connect snippets.
  </Card>

  <Card title="Policies" icon="shield" href="/trustgate/policies/overview">
    Rate limits, budgets, guardrails, tool governance.
  </Card>
</CardGroup>
