---
title: Conventions
url: https://lumean.app/tr/developers/docs/guide/conventions
locale: tr
description: "The response and error format, the base URL, identifier types and the date format."
updated: 2026-11-09
source_locale: en
sources: [get-orders, post-orders, get-orders-chunks-preview-preview-id, get-voices]
errors: ["422", "404"]
spec_version: 1.0.0
---

# Conventions

The response format, addresses, identifiers and time work the same way across all API operations.

## Response envelope

```json
{ "success": true,  "message": "<human-readable text>", "data": <payload> }
{ "success": false, "message": "<reason>" }
```

Successful responses (200 and 201) and most rejections use this envelope. In errors, `data` is
either absent or `null`. `401` and `403` from the key and scope checks send `data: null`
explicitly. The `errors` field appears only with `422`.

Domain rejections add machine-readable fields to the envelope. Almost always this is `reason`, and
the same value comes in `error_code`. The token quota adds `window`, `limit`, `used`, `reset_at` and
`retry_after`. In explicit top-up confirmation mode, `402` and `409` carry the quote fields:
`shortfall_tokens`, `quote_token`, `expires_at`, `actual_lmc_minor`, `quoted_lmc_minor`.

## Validation errors (422)

```json
{
  "success": false,
  "message": "<summary message>",
  "errors": { "config.tts_settings.voice_id": ["error text", "..."] }
}
```

A field error arrives in the same envelope, with an `errors` field. The `errors` keys are dotted
request field paths, not top-level names.

### 422 — 422 — request not accepted

| Что произошло | Что делать |
| --- | --- |
| The request was not accepted and nothing was created. A field error arrives in the common envelope: `{"success": false, "message": "…", "errors": {"field": ["…"]}}`. | First check whether the body has `errors`. If it does, fix the listed fields. If there is no `errors` but there is a `reason`, the request fields are not the problem: the same body gets the same refusal. Open the page for that code. |

`Retry-After`: нет. Разбор: https://lumean.app/tr/developers/docs/errors/422

If a `422` has `errors`, fix the request fields. If there is no `errors` but there is a `reason`
(`content_blocked`, `text_empty`, `service_not_found` and others), the fields are fine and the
request was rejected for its content. The same request returns the same response.

## Base URL and environment

| What | Value |
| --- | --- |
| REST base | `https://api.lumean.app/api/public` |
| WebSocket | `wss://ws.lumean.app:443`, app key `7c4dd881d8116ac76fe89aff71d8c2ff` |
| WS auth | `POST https://api.lumean.app/api/public/broadcasting/auth` |
| OpenAPI | `https://api.lumean.app/docs/public-openapi.json` (EN: `…/public-openapi.en.json`) |
| AsyncAPI | `https://api.lumean.app/docs/public-asyncapi.json` |

There is one environment: the public API has no sandbox or staging host. Test requests go to the
same address and are billed the same way. To check a request without being charged, use the free
chunking preview, `POST /orders/chunks/preview`.

All requests use HTTPS. The request body is JSON (`Content-Type: application/json`), except for
file uploads (`multipart/form-data`). Responses are JSON in UTF-8.

## Identifier types

| Resource | Type | Format |
| --- | --- | --- |
| Order, Template | UUID (string) | `8f14e45f-ceea-467a-9c0e-4d2b9f1b2c3d` |
| User, ApiKey, Subscription, Service | integer | `42` |
| External voice (ElevenLabs, HeyGen) | the provider's string `voice_id` | format set by the provider |
| Chunk preview (`previewId`) | sha256, 64 hex characters, no hyphens | `3f9a1c…` |

Only orders and templates use UUIDs, so don't validate every id as a UUID.

`preview_id` is not a resource identifier but a content hash. It depends on the text, the template
and the mode: the same text gives the same `preview_id`, and the response comes from the cache
right away. The cache is shared per owner, so it also works for text that a web session of the same
account has already processed. A repeated request does not produce a new `preview_id`.

An external provider's `voice_id` goes into the template, in `config.tts_settings.voice_id`, not
into the order. See the [Templates](/developers/docs/guide/templates) guide.

WebSocket needs the numeric user `id` from `GET /user`, not an order UUID: the private channel is
named `private-orders.{userId}`. See the [Realtime](/developers/docs/guide/realtime) guide.

### GET /orders/chunks/preview/{previewId}

Preview Page

Справочник: https://lumean.app/tr/developers/docs/api/get-orders-chunks-preview-preview-id

## Dates and time

```
2026-07-08T12:34:56+00:00
```

Times in responses use ISO-8601 with an explicit offset, in UTC by default. The `X-Timezone`
header with an IANA zone name converts them to your zone: see
[Keys, scopes and headers](/developers/docs/guide/authentication). Calendar dates in `Y-m-d`
format, such as the boundaries of validity periods, are not converted: they have no zone.

## Pagination

```json
{ "items": [...], "current_page": 1, "last_page": 5, "per_page": 20, "total": 93 }
```

Regular lists return this object in `data`. The counters sit next to `items`, and the query
parameters are `page` (starting at 1) and `per_page`. The voice catalog `GET /voices?provider=…`
uses a different wrapper, `{ provider, items, page, per_page, total, has_more }`: its `total` can
be `null`, and `has_more` shows the end of the list. See the
[Pagination](/developers/docs/guide/pagination) guide.

## How to read errors

Read a response in this order:

1. The HTTP code is the class of the response.
2. `reason` in the body is the machine-readable rejection code. Branch on it.
3. `errors` appears only with a `422` for invalid request fields: a map of field paths to arrays
   of messages.
4. `message` is human-readable text in the response language. The wording changes without notice
   and depends on `X-Locale`, so don't use `message` to identify an error.

Every `reason` code is covered in the [error catalog](/developers/docs/errors). It also has a
[diagnostic tool](/developers/docs/errors#s-diagnose): paste the whole response body into it.

---

- Bu sayfa tarayıcıda: https://lumean.app/tr/developers/docs/guide/conventions
- Makine tarafından okunabilir tam başvuru: https://api.lumean.app/docs/llm.md
