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

# Dedicated endpoints

> Reserve model capacity, send requests, monitor usage, and cancel service

Reserve model capacity by choosing a model and plan. Morph provisions and operates it; once ready, connect an OpenAI client using the endpoint's URL and served model name.

<Note>
  Idle capacity remains allocated and billable. Endpoints do not automatically shrink with traffic or scale to zero.
</Note>

## Create an endpoint

<Tabs>
  <Tab title="CLI">
    Install the Morph CLI:

    ```bash theme={null}
    curl -fsSL https://morphllm.com/install.sh | bash
    export PATH="$HOME/.local/bin:$PATH"
    ```

    Create a [dashboard API key](https://www.morphllm.com/dashboard/api-keys) for the endpoint's account or organization, then set it in your terminal:

    ```bash theme={null}
    export MORPH_API_KEY="YOUR_MORPH_API_KEY"
    morph dedicated models
    morph dedicated create deepseek-v4-flash
    ```

    `models` lists valid IDs; substitute one for `deepseek-v4-flash` if needed.

    Without a plan flag, `create` opens the browser plan picker. Select the owning account or organization there; the CLI key does not select browser billing. Choose capacity, review the agreement, and confirm.

    Alternatively, choose `--price`, `--balanced`, or `--fast` in the terminal:

    ```bash theme={null}
    morph dedicated create deepseek-v4-flash --balanced
    ```

    The CLI shows the plan, requests confirmation, then uses saved payment details or opens hosted checkout. Use one purchase flow per endpoint.
  </Tab>

  <Tab title="Dashboard">
    From [Dedicated](https://www.morphllm.com/dashboard/dedicated), [create an endpoint](https://www.morphllm.com/dashboard/dedicated/create).

    Choose a model and capacity. Review price, billing account, and agreement before purchasing. Organization purchases require an admin.
  </Tab>
</Tabs>

## Wait for readiness

Watch provisioning on the endpoint's dashboard detail page, or list and inspect orders:

```bash theme={null}
morph dedicated list
morph dedicated status ENDPOINT_ID
```

Use the ID from your purchase or endpoint list. Wait for `ready` and connection details before sending requests; provisioning status is not a serving URL.

Get connection details and lifecycle events as JSON:

```bash theme={null}
morph dedicated status ENDPOINT_ID --json
```

After activation, `endpoint.endpointUrl` and `endpoint.servedModelName` identify your endpoint. Use this served name for requests, not the catalog ID.

## Send a request

Copy connection details from the dashboard or status response; set them alongside your key:

```bash theme={null}
export MORPH_API_KEY="YOUR_MORPH_API_KEY"
export MORPH_ENDPOINT_URL="YOUR_ENDPOINT_URL"
export MORPH_ENDPOINT_MODEL="YOUR_SERVED_MODEL_NAME"
```

Supply the URL without `/v1`; these examples append it.

<Tabs>
  <Tab title="Python">
    Run `pip install openai`, then:

    ```python theme={null}
    import os
    from openai import OpenAI

    client = OpenAI(
        api_key=os.environ["MORPH_API_KEY"],
        base_url=os.environ["MORPH_ENDPOINT_URL"].rstrip("/") + "/v1",
    )

    response = client.chat.completions.create(
        model=os.environ["MORPH_ENDPOINT_MODEL"],
        messages=[{"role": "user", "content": "Hello!"}],
    )
    print(response.choices[0].message.content)
    ```
  </Tab>

  <Tab title="JavaScript">
    Run `npm install openai`. Save as `request.mjs`; run `node request.mjs`:

    ```javascript theme={null}
    import OpenAI from "openai";

    const endpointUrl = process.env.MORPH_ENDPOINT_URL;
    const model = process.env.MORPH_ENDPOINT_MODEL;
    if (!endpointUrl || !model) {
      throw new Error("Set MORPH_ENDPOINT_URL and MORPH_ENDPOINT_MODEL from the endpoint status.");
    }

    const client = new OpenAI({
      apiKey: process.env.MORPH_API_KEY,
      baseURL: endpointUrl.replace(/\/$/, "") + "/v1",
    });

    const response = await client.chat.completions.create({
      model,
      messages: [{ role: "user", content: "Hello!" }],
    });
    console.log(response.choices[0].message.content);
    ```
  </Tab>
</Tabs>

Keys must belong to the endpoint's account or organization. `morph token new` saves a CLI key; SDKs still need `MORPH_API_KEY` exported.

## Monitor your endpoint

Open its dashboard:

```bash theme={null}
morph dedicated dashboard ENDPOINT_ID
```

View provisioning, request counts, token usage, latency, and success metrics where available. Logs contain operational metadata, excluding prompts and responses.

```bash theme={null}
morph dedicated logs ENDPOINT_ID
morph dedicated logs ENDPOINT_ID --errors
morph dedicated logs ENDPOINT_ID --follow
morph dedicated history ENDPOINT_ID
```

`logs --follow` polls until Ctrl+C; `history` shows lifecycle events, including provisioning. Logs are empty before activation because requests are not yet served.

## Capacity and scaling

Lower traffic does not reduce reserved capacity or charges. The CLI and dashboard expose no autoscaling limits, scaling to zero, region selection, custom weights, or engine configuration. Morph manages serving and placement; contact us for other capacity arrangements.

Endpoint access is scoped to your account, but hardware is not exclusive: idle hardware may serve other traffic.

Use [shared inference](/shared-inference) without reserving capacity.

## Billing and cancellation

Hourly plans bill reserved GPU time from readiness, including idle time. Displayed token counts measure usage, not charges. Check your checkout agreement for rates and service terms.

In [Dedicated](https://www.morphllm.com/dashboard/dedicated), select **Cancel dedicated** on the order or detail page and confirm. Organization cancellations require an admin. Alternatively:

```bash theme={null}
morph dedicated stop ENDPOINT_ID
```

Canceling a purchased order before activation stops billing immediately and starts refunds for collected payments. Active endpoints follow their agreement: service and charges continue until the cancellation response's effective date, also shown in `status`.

Verify with `morph dedicated status ENDPOINT_ID`. Cancel accidental purchases before creating another endpoint.

## Troubleshoot a request

| Symptom                                      | What to check                                                          |
| :------------------------------------------- | :--------------------------------------------------------------------- |
| Still provisioning                           | Check `status` and `history`; wait for `ready` and connection details. |
| Unauthorized                                 | Use a valid key from the owning account or organization.               |
| Model not found                              | Use the served model name, not the catalog ID.                         |
| Request fails                                | Check `logs --errors` and readiness.                                   |
| Organization purchase or cancellation denied | Ask an organization admin.                                             |

For provisioning failures, send [support](https://www.morphllm.com/contact) the endpoint ID and history. Do not duplicate pending orders.
