> See the full index of documentation pages at https://docs.zettabyte.com/llms.txt.

# Call your endpoint

> Send requests to a deployed inference endpoint over HTTP.

Source: https://docs.zettabyte.com/docs/deploy-and-serve/call-your-endpoint

Last updated: 2026-07-21

Once an endpoint is running, you can send inference requests to it over HTTP with any client. Calls made over the inference API consume tokens, which are metered under Token usage.

## Before you begin

- A deployed endpoint that is running. In the Inference list its Scaling shows every replica running, for example `1/1`. See Deploy a model.
- An API key with the **Inference Service** permission. The key is shown once at creation, so copy it then. See API keys.

## Find your details

You need three things:

- Your API key, from **API KEY > Create API KEY**.
- Your tenant ID, shown with your tenant name in the menu at the bottom left of the sidebar.
- The endpoint's job alias name, from the Inference list.

The tenant ID and job alias name combine into the `Service-Name` header, described below.

## Call with cURL

```bash
curl https://app.zettabytecloud.com/inference/v1/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Service-Name: TENANT_ID.JOB_ALIAS_NAME" \
  -d '{
    "prompt": "Hello",
    "max_tokens": 128,
    "temperature": 0.7
  }'
```

## Call with Python

```python
import requests

resp = requests.post(
    "https://app.zettabytecloud.com/inference/v1/completions",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR_API_KEY",
        "Service-Name": "TENANT_ID.JOB_ALIAS_NAME",
    },
    json={"prompt": "Hello", "max_tokens": 128, "temperature": 0.7},
)
print(resp.json())
```

## The Service-Name header

The `Service-Name` header routes your request to your specific deployment. It is built as `TENANT_ID.JOB_ALIAS_NAME`: your tenant ID, a dot, then the endpoint's job alias name.

> [!WARNING]
> **zCLOUD-specific header**
> `Service-Name` is a zCLOUD-specific (non-standard) header. It is not part of the standard OpenAI-style API, so remember to add it **explicitly in every client**.

## Troubleshooting

- `401` or auth error: the API key is missing the **Inference Service** permission, or it has expired. See API keys.
- `404` or wrong service: the `Service-Name` header is malformed. Check that it reads `TENANT_ID.JOB_ALIAS_NAME`.
- Connection refused or an empty response: the endpoint is still Pending. Wait until Scaling shows every replica running, for example `1/1`. See Deploy a model.

For the full request and response reference, see Inference API.
