# Quickstart Source: https://docs.getworg.com/ Send your first request. You need an account, a balance, and an API key. ## 1. Create a key [Sign up in the console](https://console.getworg.com), top up, then open API keys and create a key. It starts with a fixed prefix and is shown once. Store it in an environment variable: Shell: ```bash export WORG_API_KEY="" ``` ## 2. Set the base URL and a lane - Base URL: `https://api.getworg.com/v1` - Model: `deepseek-v4.1-flash:cached` Any model ID from `GET /v1/models` works, or a combo you built: `combo/`. See [Models and compatibility](https://docs.getworg.com/models). ## 3. Send a request ```bash curl https://api.getworg.com/v1/chat/completions \ -H "Authorization: Bearer $WORG_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-v4.1-flash:cached", "messages": [{"role": "user", "content": "Say hello in Indonesian."}], "max_tokens": 512 }' ``` ```python import os from openai import OpenAI client = OpenAI( base_url="https://api.getworg.com/v1", api_key=os.environ["WORG_API_KEY"], ) response = client.chat.completions.create( model="deepseek-v4.1-flash:cached", messages=[{"role": "user", "content": "Say hello in Indonesian."}], max_tokens=512, ) print(response.model) print(response.choices[0].message.content) ``` ```typescript import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.getworg.com/v1", apiKey: process.env.WORG_API_KEY, }); const response = await client.chat.completions.create({ model: "deepseek-v4.1-flash:cached", messages: [{ role: "user", content: "Say hello in Indonesian." }], max_tokens: 512, }); console.log(response.model); console.log(response.choices[0].message.content); ``` Python and TypeScript use the official OpenAI SDK with Worg's base URL. Keep `max_tokens` in your requests: Worg sets aside the most a request can cost before sending it, and without a cap it holds the model's whole output limit. See [Rate limits](https://docs.getworg.com/rate-limits#hold). The answer comes back in the OpenAI format. `model` names the lane that answered: Response: ```json { "id": "1de736c749414b5b9c43112f583c28eb", "object": "chat.completion", "created": 1793532641, "model": "deepseek-v4.1-flash:cached", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Halo!" }, "logprobs": null, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 9, "completion_tokens": 4, "total_tokens": 13, "prompt_tokens_details": { "cached_tokens": 0 } } } ``` > If the first request fails > > `401 invalid_api_key`: check the key and the Authorization header. > > `404 model_not_found`: use an ID from `GET /v1/models`. > > `402 insufficient_balance`: top up, or set a lower `max_tokens`. ## 4. Check the cost Open Usage in the console. The request is listed with the lane that served it, its tokens and its cost, and the balance has gone down by that cost. To use Worg from LiteLLM, LangChain, the Vercel AI SDK or a coding agent, see [Connect clients](https://docs.getworg.com/connect-clients). Next: [Platform overview](https://docs.getworg.com/platform-overview) · [Connect clients](https://docs.getworg.com/connect-clients) · [Chat requests](https://docs.getworg.com/chat-completions)