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

# Set Up Direct Access

> Call Monid server-to-server with a single API key for internal, user-invisible workflows.

Use Monid as an internal building block. Your backend calls Monid with a single API key; end users never see Monid or need their own account.

## 1. Create an API Key

Create an account at [Monid dashboard](https://app.monid.ai), then generate an API key at the API key management page. Store it as a server-side secret.

<Note>
  Every Monid request should include an `x-workspace-id` header. List available workspaces with [`GET /v1/auth/workspaces`](/api/auth/workspaces).
</Note>

## 2. Pick a Pattern

### Pattern A: Full Discover / Inspect / Run

Best when your product (or internal agent) needs to pick tools dynamically.

<CardGroup cols={3}>
  <Card title="POST /v1/discover" icon="magnifying-glass" href="/api/discover">
    Search for endpoints in natural language.
  </Card>

  <Card title="POST /v1/inspect" icon="circle-info" href="/api/inspect">
    Get the input schema, output shape, and price.
  </Card>

  <Card title="POST /v1/run" icon="play" href="/api/run">
    Execute an endpoint and get results.
  </Card>
</CardGroup>

### Pattern B: Curated Endpoints Only

Best when you want a simple, fixed interface with predictable pricing. Pre-select the endpoints you care about, wrap them behind your own function or API, and call `run` directly.

Browse available endpoints at [monid.ai/tools](https://monid.ai/tools) to find the ones you want to expose.

```ts theme={null}
// Example: an internal helper that only exposes one endpoint
async function runTool(input: Record<string, unknown>) {
  const res = await fetch("https://api.monid.ai/v1/run", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.MONID_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      provider: "<provider>",
      endpoint: "<endpoint>",
      input,
    }),
  });
  return res.json();
}
```

## 3. Billing

All usage bills to your single Monid wallet with one invoice and no per-user setup. Charge your users however you like.

## Next Steps

* [API Reference](/api/overview) — full endpoint documentation
* [How It Works](/guide/how-it-works) — discover / inspect / run overview
