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

# Quickstart

> Make your first inference request with the OpenAI SDK.

## 1. Create a customer key

Sign in to the [Limitless console](https://trylimitless.ai/app), open **API keys**, and select **Create API key**. Give the key a recognizable name and choose an expiry. Copy the secret before closing the dialog; it is shown only once.

Eligible new workspaces receive \$0.10 in free trial credits while trial credits last. Check your available balance in [**Billing**](https://trylimitless.ai/app/billing), then use it to make a request. If trial credits are unavailable or exhausted, choose Plus, Pro or Ultra, or buy prepaid usage through **Pay-as-you-go API billing**. See [plans and billing](https://docs.otamd.com/billing.md) for usage limits and payment details.

## 2. Set your environment

Provide these variables through your development environment or secret manager:

```bash theme={null}
export LIMITLESS_BASE_URL="https://trylimitless.ai/v1"
export LIMITLESS_MODEL="glm-5.3-unrestricted"
# Set LIMITLESS_API_KEY to the customer key you just created.
```

> [!NOTE]
>
> `https://trylimitless.ai/v1` is the hosted API base URL. The documentation domain, `docs.trylimitless.ai`, serves these guides and does not accept inference requests.

Keep the `/v1` suffix in the base URL. Use an ID returned by `GET /v1/models`; model availability may change.

## 3. Send a request

> [tab] JavaScript
>
> Install the official SDK:
>
> ```bash theme={null}
> npm install openai
> ```
>
> Save this as `chat.mjs` and run `node chat.mjs`:
>
> ```javascript theme={null}
> import OpenAI from "openai";
>
> const client = new OpenAI({
>   apiKey: process.env.LIMITLESS_API_KEY,
>   baseURL: process.env.LIMITLESS_BASE_URL,
>   maxRetries: 0,
> });
>
> const completion = await client.chat.completions.create({
>   model: process.env.LIMITLESS_MODEL,
>   messages: [{ role: "user", content: "Explain inference in one sentence." }],
>   max_tokens: 512,
> });
>
> console.log(completion.choices[0]?.message.content);
> console.log(completion.usage);
> console.log("Request ID:", completion._request_id);
> ```

> [tab] Python
>
> Install the official SDK:
>
> ```bash theme={null}
> pip install openai
> ```
>
> Save this as `chat.py` and run `python chat.py`:
>
> ```python theme={null}
> import os
> from openai import OpenAI
>
> client = OpenAI(
>     api_key=os.environ["LIMITLESS_API_KEY"],
>     base_url=os.environ["LIMITLESS_BASE_URL"],
>     max_retries=0,
> )
>
> completion = client.chat.completions.create(
>     model=os.environ["LIMITLESS_MODEL"],
>     messages=[{"role": "user", "content": "Explain inference in one sentence."}],
>     max_tokens=512,
> )
>
> print(completion.choices[0].message.content)
> print(completion.usage)
> print("Request ID:", completion._request_id)
> ```

> [tab] cURL
>
> This example uses the model ID `glm-5.3-unrestricted`. Replace it if your model catalog differs.
>
> ```bash theme={null}
> curl --fail-with-body "$LIMITLESS_BASE_URL/chat/completions" \
>   -H "Authorization: Bearer $LIMITLESS_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "model": "glm-5.3-unrestricted",
>     "messages": [{"role": "user", "content": "Explain inference in one sentence."}],
>     "max_tokens": 512
>   }'
> ```

The SDK package is OpenAI's; the request goes to your configured Limitless URL and uses your Limitless key. An OpenAI account or OpenAI API key is not required for this request.

The examples disable automatic retries so one explicit call produces at most one inference attempt. See [errors and retries](https://docs.otamd.com/errors.md) before adding retry logic.

## 4. Check Activity

Open **Activity** in the console. Your request should appear with source **API**, its model, status, latency, and reported token counts. Match its request ID to the response's `X-Request-ID` header.

For a complete key lifecycle test, revoke this test key in **API keys**, then run `GET /v1/models` with it. The server should return `401`. Create a new key for subsequent requests.

Next: [stream responses](https://docs.otamd.com/guides/streaming.md), [call tools](https://docs.otamd.com/guides/tool-calling.md), or [check limits](https://docs.otamd.com/limits.md).


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