relaygpu-client 0.1.1__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/CHANGELOG.md +20 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/PKG-INFO +18 -8
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/README.md +17 -7
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/pyproject.toml +1 -1
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/models.py +7 -7
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_generated/error_codes.py +84 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_generated/models_map.py +22 -6
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_generated/types.py +454 -6
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/models.py +7 -7
- relaygpu_client-0.1.3/relaygpu/_version.py +1 -0
- relaygpu_client-0.1.1/relaygpu/_version.py +0 -1
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/.gitignore +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/LICENSE +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/__init__.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/__init__.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/_http.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/account.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/audio.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/client.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/estimate.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/files.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/image.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/keys.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/run.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/tasks.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/video.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/webhooks.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_async/workflows.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_clock.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_core.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_errors.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_estimate.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_exceptions.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_generated/__init__.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_images.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_run_common.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_shapes.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/__init__.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/_http.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/account.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/audio.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/client.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/estimate.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/files.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/image.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/keys.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/run.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/tasks.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/video.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/webhooks.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_sync/workflows.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/_util.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/async_client.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/client.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/errors.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/inputs.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/py.typed +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/types.py +0 -0
- {relaygpu_client-0.1.1 → relaygpu_client-0.1.3}/relaygpu/webhooks.py +0 -0
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
`relaygpu-client` versions track the TypeScript client [`@relaygpu/client`](https://www.npmjs.com/package/@relaygpu/client)
|
|
4
4
|
minor for minor: 0.1.x here is the port of 0.1.x there. The API may change before 1.0.
|
|
5
5
|
|
|
6
|
+
## 0.1.3 (2026-11-09)
|
|
7
|
+
|
|
8
|
+
- **Generated types** follow the prod public spec of 2026-11-08 (Relay Roll 47): the OpenAI Responses route
|
|
9
|
+
(`POST /v2/openai/v1/responses`; a base-URL swap on the OpenAI SDK, stateless), the ClarityAI upscalers
|
|
10
|
+
(`/v2/image/clarity/upscale`), MiniMax H3 V2V, `moonshotai/kimi-k3.1-pro`, `GET /v2/customer/keys/{key}`,
|
|
11
|
+
`result_field` on the model detail, `cancel_requested` on workflow runs, numeric pricing cells, the Smith and
|
|
12
|
+
subscription routes with their fourteen error codes as typed errors. `openai/whisper-1` left the public model map
|
|
13
|
+
(retired 2026-11-02; use `relay/stt-1`).
|
|
14
|
+
|
|
15
|
+
## 0.1.2 (2026-10-24)
|
|
16
|
+
|
|
17
|
+
- **Catalog reads are account-aware.** `models.list`, `models.get`, `pricing.get` and `tiers.list` now send the
|
|
18
|
+
client's credential (`api_key` or `jwt`), so with one they return your account's view: the models your tier and
|
|
19
|
+
grants can run, beyond the public list. A client without a credential sends none and reads the public catalog,
|
|
20
|
+
unchanged. A key Relay refuses raises `AuthenticationError` on these reads, a key below the credit floor
|
|
21
|
+
`InsufficientCreditsError`. The `models.get` cache stays per client. `health`, task polls and workflow run polls
|
|
22
|
+
stay credential-free.
|
|
23
|
+
- **Generated types** follow the prod public spec of 2026-10-24: the Anthropic-compatible route is live again with no
|
|
24
|
+
public model list; the `doubao-seedance-2-0-filter-off` pair left the public model map.
|
|
25
|
+
|
|
6
26
|
## 0.1.1 (2026-10-22)
|
|
7
27
|
|
|
8
28
|
- **Generated types** follow the prod public spec of 2026-10-22: Claude is served through RelayConductor
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: relaygpu-client
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Python client for the Relay API: image, video and audio generation, tasks, files, webhooks, workflows and typed errors.
|
|
5
5
|
Project-URL: Homepage, https://relaygpu.com
|
|
6
6
|
Project-URL: Repository, https://github.com/OpenGPU-Network/relaygpu-python
|
|
@@ -36,7 +36,7 @@ Description-Content-Type: text/markdown
|
|
|
36
36
|
|
|
37
37
|
The Python client for [Relay](https://relaygpu.com): image, video and audio generation, async tasks, file
|
|
38
38
|
uploads, webhook verification, workflows, account and keys, with typed errors. Request and response types are
|
|
39
|
-
generated from Relay's public OpenAPI spec. Chat is not wrapped: point the OpenAI
|
|
39
|
+
generated from Relay's public OpenAPI spec. Chat is not wrapped: point the OpenAI SDK at Relay
|
|
40
40
|
([quickstart 6](#6-chat-use-the-sdk-you-already-have)). A port of the TypeScript client
|
|
41
41
|
[`@relaygpu/client`](https://www.npmjs.com/package/@relaygpu/client), version for version (0.1.x ↔ 0.1.x).
|
|
42
42
|
|
|
@@ -69,7 +69,7 @@ relay = Relay(
|
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
The key is not read from the environment: pass it. It never appears in an error, a log line or `repr(relay)`.
|
|
72
|
-
|
|
72
|
+
`health` and task polls need no credential; the catalog reads use yours when the client has one (see Models below).
|
|
73
73
|
|
|
74
74
|
The client holds a connection pool. Use it as a context manager, or call `relay.close()` when you are done:
|
|
75
75
|
|
|
@@ -284,9 +284,9 @@ with Relay(os.environ["RELAY_API_KEY"], base_url=os.environ.get("RELAY_BASE_URL"
|
|
|
284
284
|
sys.exit(f"run {e.task_id} did not complete: {e}")
|
|
285
285
|
```
|
|
286
286
|
|
|
287
|
-
### 6.
|
|
287
|
+
### 6. Text: use the SDK you already have
|
|
288
288
|
|
|
289
|
-
Chat and completions run on the official OpenAI
|
|
289
|
+
Chat and completions run on the official OpenAI SDK: point it at Relay. This SDK does not wrap
|
|
290
290
|
chat. `openai` is an example dependency only (`pip install openai`); `relaygpu-client` does not need it.
|
|
291
291
|
([`examples/06_chat_base_url.py`](examples/06_chat_base_url.py))
|
|
292
292
|
|
|
@@ -306,6 +306,15 @@ completion = client.chat.completions.create(
|
|
|
306
306
|
print(completion.choices[0].message.content)
|
|
307
307
|
```
|
|
308
308
|
|
|
309
|
+
The Responses API is the same swap, on the same base URL, for the `openai` models that list it (`GET /v2/models`):
|
|
310
|
+
|
|
311
|
+
```python
|
|
312
|
+
response = client.responses.create(model="openai/gpt-5.5", input="Say hello in five words.")
|
|
313
|
+
print(response.output_text)
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Responses on Relay is stateless: Relay sets `store: false`, and `previous_response_id` and `conversation` are refused. Resend the `input` each turn.
|
|
317
|
+
|
|
309
318
|
## Any model: `run()` and model resolution
|
|
310
319
|
|
|
311
320
|
```python
|
|
@@ -325,6 +334,8 @@ knows also get `Literal` hints for autocomplete.
|
|
|
325
334
|
|
|
326
335
|
- An unknown name raises `ModelNotFoundError` (404); a retired one raises `ModelRetiredError` (403). Both
|
|
327
336
|
before anything is submitted or billed.
|
|
337
|
+
- With a credential the catalog reads (`models`, `pricing`, `tiers`) are your account's view: what your tier and
|
|
338
|
+
grants can run. Without one they are the public catalog. A refused key raises `AuthenticationError` on them.
|
|
328
339
|
- `relay.models.list(tag="text-to-video")` lists the catalog; `relay.models.get(name)` returns one model with
|
|
329
340
|
its `request_schema`, `request_example` and `pricing`.
|
|
330
341
|
- `run()` returns a sync route's body, or waits for an async route and returns the task's `result`.
|
|
@@ -553,14 +564,13 @@ CPython 3.10, 3.11, 3.12 and 3.13, tested in CI on each. One runtime dependency,
|
|
|
553
564
|
(`AsyncRelay` runs on `asyncio`). `relay.request(method, path, json=...)` reaches any route
|
|
554
565
|
with the same errors and retry policy.
|
|
555
566
|
|
|
556
|
-
##
|
|
567
|
+
## Text
|
|
557
568
|
|
|
558
|
-
Chat is a base-URL swap on the official
|
|
569
|
+
Chat is a base-URL swap on the official SDK, in any language:
|
|
559
570
|
|
|
560
571
|
| SDK | Base URL |
|
|
561
572
|
|---|---|
|
|
562
573
|
| OpenAI | `https://relaygpu.com/v2/openai/v1` |
|
|
563
|
-
| Anthropic | `https://relaygpu.com/v2/anthropic` |
|
|
564
574
|
|
|
565
575
|
## License
|
|
566
576
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
The Python client for [Relay](https://relaygpu.com): image, video and audio generation, async tasks, file
|
|
6
6
|
uploads, webhook verification, workflows, account and keys, with typed errors. Request and response types are
|
|
7
|
-
generated from Relay's public OpenAPI spec. Chat is not wrapped: point the OpenAI
|
|
7
|
+
generated from Relay's public OpenAPI spec. Chat is not wrapped: point the OpenAI SDK at Relay
|
|
8
8
|
([quickstart 6](#6-chat-use-the-sdk-you-already-have)). A port of the TypeScript client
|
|
9
9
|
[`@relaygpu/client`](https://www.npmjs.com/package/@relaygpu/client), version for version (0.1.x ↔ 0.1.x).
|
|
10
10
|
|
|
@@ -37,7 +37,7 @@ relay = Relay(
|
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
The key is not read from the environment: pass it. It never appears in an error, a log line or `repr(relay)`.
|
|
40
|
-
|
|
40
|
+
`health` and task polls need no credential; the catalog reads use yours when the client has one (see Models below).
|
|
41
41
|
|
|
42
42
|
The client holds a connection pool. Use it as a context manager, or call `relay.close()` when you are done:
|
|
43
43
|
|
|
@@ -252,9 +252,9 @@ with Relay(os.environ["RELAY_API_KEY"], base_url=os.environ.get("RELAY_BASE_URL"
|
|
|
252
252
|
sys.exit(f"run {e.task_id} did not complete: {e}")
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
### 6.
|
|
255
|
+
### 6. Text: use the SDK you already have
|
|
256
256
|
|
|
257
|
-
Chat and completions run on the official OpenAI
|
|
257
|
+
Chat and completions run on the official OpenAI SDK: point it at Relay. This SDK does not wrap
|
|
258
258
|
chat. `openai` is an example dependency only (`pip install openai`); `relaygpu-client` does not need it.
|
|
259
259
|
([`examples/06_chat_base_url.py`](examples/06_chat_base_url.py))
|
|
260
260
|
|
|
@@ -274,6 +274,15 @@ completion = client.chat.completions.create(
|
|
|
274
274
|
print(completion.choices[0].message.content)
|
|
275
275
|
```
|
|
276
276
|
|
|
277
|
+
The Responses API is the same swap, on the same base URL, for the `openai` models that list it (`GET /v2/models`):
|
|
278
|
+
|
|
279
|
+
```python
|
|
280
|
+
response = client.responses.create(model="openai/gpt-5.5", input="Say hello in five words.")
|
|
281
|
+
print(response.output_text)
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Responses on Relay is stateless: Relay sets `store: false`, and `previous_response_id` and `conversation` are refused. Resend the `input` each turn.
|
|
285
|
+
|
|
277
286
|
## Any model: `run()` and model resolution
|
|
278
287
|
|
|
279
288
|
```python
|
|
@@ -293,6 +302,8 @@ knows also get `Literal` hints for autocomplete.
|
|
|
293
302
|
|
|
294
303
|
- An unknown name raises `ModelNotFoundError` (404); a retired one raises `ModelRetiredError` (403). Both
|
|
295
304
|
before anything is submitted or billed.
|
|
305
|
+
- With a credential the catalog reads (`models`, `pricing`, `tiers`) are your account's view: what your tier and
|
|
306
|
+
grants can run. Without one they are the public catalog. A refused key raises `AuthenticationError` on them.
|
|
296
307
|
- `relay.models.list(tag="text-to-video")` lists the catalog; `relay.models.get(name)` returns one model with
|
|
297
308
|
its `request_schema`, `request_example` and `pricing`.
|
|
298
309
|
- `run()` returns a sync route's body, or waits for an async route and returns the task's `result`.
|
|
@@ -521,14 +532,13 @@ CPython 3.10, 3.11, 3.12 and 3.13, tested in CI on each. One runtime dependency,
|
|
|
521
532
|
(`AsyncRelay` runs on `asyncio`). `relay.request(method, path, json=...)` reaches any route
|
|
522
533
|
with the same errors and retry policy.
|
|
523
534
|
|
|
524
|
-
##
|
|
535
|
+
## Text
|
|
525
536
|
|
|
526
|
-
Chat is a base-URL swap on the official
|
|
537
|
+
Chat is a base-URL swap on the official SDK, in any language:
|
|
527
538
|
|
|
528
539
|
| SDK | Base URL |
|
|
529
540
|
|---|---|
|
|
530
541
|
| OpenAI | `https://relaygpu.com/v2/openai/v1` |
|
|
531
|
-
| Anthropic | `https://relaygpu.com/v2/anthropic` |
|
|
532
542
|
|
|
533
543
|
## License
|
|
534
544
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "relaygpu-client"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.3"
|
|
8
8
|
description = "Python client for the Relay API: image, video and audio generation, tasks, files, webhooks, workflows and typed errors."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"""The catalog
|
|
2
|
-
``async_default`` and schemas."""
|
|
1
|
+
"""The catalog (port of src/models.ts); read as your account when the client has a credential, public otherwise.
|
|
2
|
+
``models.get`` is the SDK's one resolver of route, ``model_in_body``, ``async_default`` and schemas."""
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
@@ -15,7 +15,7 @@ if TYPE_CHECKING:
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class AsyncModels:
|
|
18
|
-
"""``GET /v2/models`` and ``GET /v2/models/{name}``
|
|
18
|
+
"""``GET /v2/models`` and ``GET /v2/models/{name}`` ."""
|
|
19
19
|
|
|
20
20
|
def __init__(self, relay: AsyncRelay) -> None:
|
|
21
21
|
self._relay = relay
|
|
@@ -24,7 +24,7 @@ class AsyncModels:
|
|
|
24
24
|
async def list(self, *, tag: str | None = None) -> list[ModelRow]:
|
|
25
25
|
"""``GET /v2/models`` flattened: every model listed under ``auto``, once, optionally filtered by ``tag``
|
|
26
26
|
(e.g. ``text-to-video``)."""
|
|
27
|
-
res = await self._relay._http.request("GET", "/v2/models"
|
|
27
|
+
res = await self._relay._http.request("GET", "/v2/models")
|
|
28
28
|
data = cast(ModelCatalog, res.data)
|
|
29
29
|
seen: dict[str, ModelRow] = {}
|
|
30
30
|
for rows in (data.get("auto") or {}).values():
|
|
@@ -41,7 +41,7 @@ class AsyncModels:
|
|
|
41
41
|
hit = self._cache.get(name)
|
|
42
42
|
if hit is not None and hit[0] > now:
|
|
43
43
|
return hit[1]
|
|
44
|
-
res = await self._relay._http.request("GET", model_path(name)
|
|
44
|
+
res = await self._relay._http.request("GET", model_path(name))
|
|
45
45
|
detail = cast(ModelDetail, res.data)
|
|
46
46
|
self._cache[name] = (now + common.MODEL_CACHE_SECONDS, detail)
|
|
47
47
|
return detail
|
|
@@ -54,7 +54,7 @@ class AsyncPricing:
|
|
|
54
54
|
self._relay = relay
|
|
55
55
|
|
|
56
56
|
async def get(self) -> PricingResponse:
|
|
57
|
-
res = await self._relay._http.request("GET", "/v2/pricing"
|
|
57
|
+
res = await self._relay._http.request("GET", "/v2/pricing")
|
|
58
58
|
return cast(PricingResponse, res.data)
|
|
59
59
|
|
|
60
60
|
|
|
@@ -65,7 +65,7 @@ class AsyncTiers:
|
|
|
65
65
|
self._relay = relay
|
|
66
66
|
|
|
67
67
|
async def list(self) -> TiersResponse:
|
|
68
|
-
res = await self._relay._http.request("GET", "/v2/tiers"
|
|
68
|
+
res = await self._relay._http.request("GET", "/v2/tiers")
|
|
69
69
|
return cast(TiersResponse, res.data)
|
|
70
70
|
|
|
71
71
|
|
|
@@ -274,6 +274,62 @@ class ServiceUnavailableError(CapacityError):
|
|
|
274
274
|
"""`SERVICE_UNAVAILABLE` (HTTP 503)."""
|
|
275
275
|
|
|
276
276
|
|
|
277
|
+
class SmithLevelUnavailableError(ValidationError):
|
|
278
|
+
"""`SMITH_LEVEL_UNAVAILABLE` (HTTP 422)."""
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
class SmithMessageStartedError(ConflictError):
|
|
282
|
+
"""`SMITH_MESSAGE_STARTED` (HTTP 409)."""
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
class SmithNotEntitledError(PermissionDeniedError):
|
|
286
|
+
"""`SMITH_NOT_ENTITLED` (HTTP 403)."""
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
class SmithNotFoundError(NotFoundError):
|
|
290
|
+
"""`SMITH_NOT_FOUND` (HTTP 404)."""
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
class SmithQueueFullError(ConflictError):
|
|
294
|
+
"""`SMITH_QUEUE_FULL` (HTTP 409)."""
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
class SmithSessionBusyError(ConflictError):
|
|
298
|
+
"""`SMITH_SESSION_BUSY` (HTTP 409)."""
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
class SmithStepNotPausedError(ConflictError):
|
|
302
|
+
"""`SMITH_STEP_NOT_PAUSED` (HTTP 409)."""
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
class SmithTurnLimitError(ValidationError):
|
|
306
|
+
"""`SMITH_TURN_LIMIT` (HTTP 422)."""
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
class SmithUnavailableError(CapacityError):
|
|
310
|
+
"""`SMITH_UNAVAILABLE` (HTTP 503)."""
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
class SubscriptionChargeFailedError(InsufficientCreditsError):
|
|
314
|
+
"""`SUBSCRIPTION_CHARGE_FAILED` (HTTP 402)."""
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
class SubscriptionExistsError(ConflictError):
|
|
318
|
+
"""`SUBSCRIPTION_EXISTS` (HTTP 409)."""
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
class SubscriptionNotEligibleError(PermissionDeniedError):
|
|
322
|
+
"""`SUBSCRIPTION_NOT_ELIGIBLE` (HTTP 403)."""
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
class SubscriptionTrialUsedError(ConflictError):
|
|
326
|
+
"""`SUBSCRIPTION_TRIAL_USED` (HTTP 409)."""
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
class SubscriptionUnavailableError(CapacityError):
|
|
330
|
+
"""`SUBSCRIPTION_UNAVAILABLE` (HTTP 503)."""
|
|
331
|
+
|
|
332
|
+
|
|
277
333
|
class SuperkeyConflictError(ConflictError):
|
|
278
334
|
"""`SUPERKEY_CONFLICT` (HTTP 409)."""
|
|
279
335
|
|
|
@@ -388,6 +444,20 @@ ERROR_CODE_CLASSES: dict[str, type[RelayAPIError]] = {
|
|
|
388
444
|
"ROUTING_ON_FIXED_MODEL": RoutingOnFixedModelError,
|
|
389
445
|
"SCOPE_DENIED": ScopeDeniedError,
|
|
390
446
|
"SERVICE_UNAVAILABLE": ServiceUnavailableError,
|
|
447
|
+
"SMITH_LEVEL_UNAVAILABLE": SmithLevelUnavailableError,
|
|
448
|
+
"SMITH_MESSAGE_STARTED": SmithMessageStartedError,
|
|
449
|
+
"SMITH_NOT_ENTITLED": SmithNotEntitledError,
|
|
450
|
+
"SMITH_NOT_FOUND": SmithNotFoundError,
|
|
451
|
+
"SMITH_QUEUE_FULL": SmithQueueFullError,
|
|
452
|
+
"SMITH_SESSION_BUSY": SmithSessionBusyError,
|
|
453
|
+
"SMITH_STEP_NOT_PAUSED": SmithStepNotPausedError,
|
|
454
|
+
"SMITH_TURN_LIMIT": SmithTurnLimitError,
|
|
455
|
+
"SMITH_UNAVAILABLE": SmithUnavailableError,
|
|
456
|
+
"SUBSCRIPTION_CHARGE_FAILED": SubscriptionChargeFailedError,
|
|
457
|
+
"SUBSCRIPTION_EXISTS": SubscriptionExistsError,
|
|
458
|
+
"SUBSCRIPTION_NOT_ELIGIBLE": SubscriptionNotEligibleError,
|
|
459
|
+
"SUBSCRIPTION_TRIAL_USED": SubscriptionTrialUsedError,
|
|
460
|
+
"SUBSCRIPTION_UNAVAILABLE": SubscriptionUnavailableError,
|
|
391
461
|
"SUPERKEY_CONFLICT": SuperkeyConflictError,
|
|
392
462
|
"SYSTEM_KEY_IMMUTABLE": SystemKeyImmutableError,
|
|
393
463
|
"TASK_NOT_FOUND": TaskNotFoundError,
|
|
@@ -469,6 +539,20 @@ __all__ = [
|
|
|
469
539
|
"RoutingOnFixedModelError",
|
|
470
540
|
"ScopeDeniedError",
|
|
471
541
|
"ServiceUnavailableError",
|
|
542
|
+
"SmithLevelUnavailableError",
|
|
543
|
+
"SmithMessageStartedError",
|
|
544
|
+
"SmithNotEntitledError",
|
|
545
|
+
"SmithNotFoundError",
|
|
546
|
+
"SmithQueueFullError",
|
|
547
|
+
"SmithSessionBusyError",
|
|
548
|
+
"SmithStepNotPausedError",
|
|
549
|
+
"SmithTurnLimitError",
|
|
550
|
+
"SmithUnavailableError",
|
|
551
|
+
"SubscriptionChargeFailedError",
|
|
552
|
+
"SubscriptionExistsError",
|
|
553
|
+
"SubscriptionNotEligibleError",
|
|
554
|
+
"SubscriptionTrialUsedError",
|
|
555
|
+
"SubscriptionUnavailableError",
|
|
472
556
|
"SuperkeyConflictError",
|
|
473
557
|
"SystemKeyImmutableError",
|
|
474
558
|
"TaskNotFoundError",
|
|
@@ -13,7 +13,6 @@ MODEL_OPERATIONS: dict[str, dict[str, str]] = {
|
|
|
13
13
|
"MiniMax/speech-2.8-hd": "audio_minimax_speech_2_8_hd_generate",
|
|
14
14
|
"Qwen/qwen3-tts-flash": "audio_qwen3_tts_flash_generate",
|
|
15
15
|
"openai/gpt-4o-mini-transcribe": "audio_asr_whisper",
|
|
16
|
-
"openai/whisper-1": "audio_asr_whisper",
|
|
17
16
|
"relay/music-1": "audio_music_1_generate",
|
|
18
17
|
"relay/stt-1": "audio_asr_whisper",
|
|
19
18
|
"relay/tts-1": "audio_tts_1_generate",
|
|
@@ -24,6 +23,9 @@ MODEL_OPERATIONS: dict[str, dict[str, str]] = {
|
|
|
24
23
|
},
|
|
25
24
|
"Image": {
|
|
26
25
|
"ByteDance/doubao-seedream-5-0-pro-260628": "image_seedream_5_0_pro_generate",
|
|
26
|
+
"ClarityAI/creative": "image_clarity_upscale",
|
|
27
|
+
"ClarityAI/crystal": "image_clarity_upscale",
|
|
28
|
+
"ClarityAI/flux": "image_clarity_upscale",
|
|
27
29
|
"Wan-AI/Wan2.7-Image-Pro": "image_wan_2_7_image_pro_generate",
|
|
28
30
|
"black-forest-labs/FLUX-2-pro": "image_flux_generate",
|
|
29
31
|
"google/gemini-2.5-flash-image": "image_gemini_3_generate",
|
|
@@ -48,6 +50,7 @@ MODEL_OPERATIONS: dict[str, dict[str, str]] = {
|
|
|
48
50
|
"google/gemma-4-31B-turbo": "openai_chat_completions",
|
|
49
51
|
"moonshotai/kimi-k2.6": "openai_chat_completions",
|
|
50
52
|
"moonshotai/kimi-k3": "openai_chat_completions",
|
|
53
|
+
"moonshotai/kimi-k3.1-pro": "openai_chat_completions",
|
|
51
54
|
"nvidia/nemotron-3-nano-30b-a3b": "openai_chat_completions",
|
|
52
55
|
"openai/gpt-4o-mini": "openai_chat_completions",
|
|
53
56
|
"openai/gpt-5.4": "openai_chat_completions",
|
|
@@ -55,6 +58,9 @@ MODEL_OPERATIONS: dict[str, dict[str, str]] = {
|
|
|
55
58
|
"openai/gpt-5.5": "openai_chat_completions",
|
|
56
59
|
"openai/gpt-5.5-pro": "openai_chat_completions",
|
|
57
60
|
"openai/gpt-6-astra": "openai_chat_completions",
|
|
61
|
+
"openai/gpt-6-luna": "openai_chat_completions",
|
|
62
|
+
"openai/gpt-6-sol": "openai_chat_completions",
|
|
63
|
+
"openai/gpt-6.1-sol": "openai_chat_completions",
|
|
58
64
|
"relay/conductor": "openai_chat_completions",
|
|
59
65
|
"x-ai/grok-4.3": "openai_chat_completions",
|
|
60
66
|
"zai-org/glm-5.1": "openai_chat_completions",
|
|
@@ -67,8 +73,6 @@ MODEL_OPERATIONS: dict[str, dict[str, str]] = {
|
|
|
67
73
|
"ByteDance/doubao-seedance-2-0-260128-V2V": "video_doubao_seedance_2_0_v2v_generate",
|
|
68
74
|
"ByteDance/doubao-seedance-2-0-fast": "video_doubao_seedance_2_0_fast_generate",
|
|
69
75
|
"ByteDance/doubao-seedance-2-0-fast-V2V": "video_doubao_seedance_2_0_fast_v2v_generate",
|
|
70
|
-
"ByteDance/doubao-seedance-2-0-filter-off": "video_doubao_seedance_2_0_filter_off_generate",
|
|
71
|
-
"ByteDance/doubao-seedance-2-0-filter-off-V2V": "video_doubao_seedance_2_0_filter_off_v2v_generate",
|
|
72
76
|
"ByteDance/doubao-seedance-2-0-mini-260615": "video_doubao_seedance_2_0_mini_generate",
|
|
73
77
|
"ByteDance/doubao-seedance-2-0-mini-260615-V2V": "video_doubao_seedance_2_0_mini_v2v_generate",
|
|
74
78
|
"ByteDance/doubao-seedance-2-5-260628": "video_doubao_seedance_2_5_generate",
|
|
@@ -85,6 +89,7 @@ MODEL_OPERATIONS: dict[str, dict[str, str]] = {
|
|
|
85
89
|
"KlingTeam/v3-Omni": "video_kling_3_omni",
|
|
86
90
|
"KlingTeam/v3-T2V": "video_kling_3_t2v",
|
|
87
91
|
"MiniMax/MiniMax-H3": "video_minimax_h3_generate",
|
|
92
|
+
"MiniMax/MiniMax-H3-V2V": "video_minimax_h3_v2v_generate",
|
|
88
93
|
"Wan-AI/Wan2.5-I2V": "video_wan_25_i2v",
|
|
89
94
|
"Wan-AI/Wan2.5-T2V": "video_wan_25_t2v",
|
|
90
95
|
"Wan-AI/Wan2.6-T2V": "video_wan_26_t2v",
|
|
@@ -109,6 +114,8 @@ OPERATION_REQUEST_SCHEMAS: dict[str, str] = {
|
|
|
109
114
|
"customer_model_allowlist_update": "UpdateModelAllowlistRequest",
|
|
110
115
|
"customer_profile_update": "UpdateProfileRequest",
|
|
111
116
|
"customer_settings_update": "CustomerSettingsUpdate",
|
|
117
|
+
"customer_subscription_plan_change": "PlanChangeRequest",
|
|
118
|
+
"image_clarity_upscale": "ClarityUpscaleRequest",
|
|
112
119
|
"image_flux_1_generate": "Flux1Request",
|
|
113
120
|
"image_flux_generate": "FluxRequest",
|
|
114
121
|
"image_gemini_3_generate": "GeminiRequest",
|
|
@@ -123,6 +130,13 @@ OPERATION_REQUEST_SCHEMAS: dict[str, str] = {
|
|
|
123
130
|
"instances_create": "InstanceRequest",
|
|
124
131
|
"openai_chat_completions": "OpenAIChatRequest",
|
|
125
132
|
"openai_embeddings": "EmbeddingRequest",
|
|
133
|
+
"openai_responses": "OpenAIResponsesRequest",
|
|
134
|
+
"smith_prefs_update": "PrefsPatch",
|
|
135
|
+
"smith_sessions_assets_save": "SaveBody",
|
|
136
|
+
"smith_sessions_create": "SessionCreate",
|
|
137
|
+
"smith_sessions_feedback": "FeedbackBody",
|
|
138
|
+
"smith_sessions_messages_create": "MessageCreate",
|
|
139
|
+
"smith_sessions_update": "SessionPatch",
|
|
126
140
|
"video_bria_upscale_generate": "BriaVideoUpscaleRequest",
|
|
127
141
|
"video_doubao_seedance_1_5_pro_generate": "DoubaoSeedance15ProRequest",
|
|
128
142
|
"video_doubao_seedance_2_0_fast_filter_off_generate": "DoubaoSeedance20Up720pRequest",
|
|
@@ -153,6 +167,7 @@ OPERATION_REQUEST_SCHEMAS: dict[str, str] = {
|
|
|
153
167
|
"video_lucy_2_5_generate": "Lucy25Request",
|
|
154
168
|
"video_lucy_vton_3_generate": "LucyVton3Request",
|
|
155
169
|
"video_minimax_h3_generate": "MiniMaxH3Request",
|
|
170
|
+
"video_minimax_h3_v2v_generate": "MiniMaxH3V2VRequest",
|
|
156
171
|
"video_sora_2_i2v": "SoraI2VRequest",
|
|
157
172
|
"video_sora_2_pro_i2v": "SoraProI2VRequest",
|
|
158
173
|
"video_sora_2_pro_t2v": "SoraProT2VRequest",
|
|
@@ -169,6 +184,9 @@ OPERATION_REQUEST_SCHEMAS: dict[str, str] = {
|
|
|
169
184
|
# Image models this release knows (any other name works too).
|
|
170
185
|
KnownImageModel = Literal[
|
|
171
186
|
"ByteDance/doubao-seedream-5-0-pro-260628",
|
|
187
|
+
"ClarityAI/creative",
|
|
188
|
+
"ClarityAI/crystal",
|
|
189
|
+
"ClarityAI/flux",
|
|
172
190
|
"Wan-AI/Wan2.7-Image-Pro",
|
|
173
191
|
"black-forest-labs/FLUX-2-pro",
|
|
174
192
|
"google/gemini-2.5-flash-image",
|
|
@@ -189,8 +207,6 @@ KnownVideoModel = Literal[
|
|
|
189
207
|
"ByteDance/doubao-seedance-2-0-260128-V2V",
|
|
190
208
|
"ByteDance/doubao-seedance-2-0-fast",
|
|
191
209
|
"ByteDance/doubao-seedance-2-0-fast-V2V",
|
|
192
|
-
"ByteDance/doubao-seedance-2-0-filter-off",
|
|
193
|
-
"ByteDance/doubao-seedance-2-0-filter-off-V2V",
|
|
194
210
|
"ByteDance/doubao-seedance-2-0-mini-260615",
|
|
195
211
|
"ByteDance/doubao-seedance-2-0-mini-260615-V2V",
|
|
196
212
|
"ByteDance/doubao-seedance-2-5-260628",
|
|
@@ -207,6 +223,7 @@ KnownVideoModel = Literal[
|
|
|
207
223
|
"KlingTeam/v3-Omni",
|
|
208
224
|
"KlingTeam/v3-T2V",
|
|
209
225
|
"MiniMax/MiniMax-H3",
|
|
226
|
+
"MiniMax/MiniMax-H3-V2V",
|
|
210
227
|
"Wan-AI/Wan2.5-I2V",
|
|
211
228
|
"Wan-AI/Wan2.5-T2V",
|
|
212
229
|
"Wan-AI/Wan2.6-T2V",
|
|
@@ -227,6 +244,5 @@ KnownSpeechModel = Literal[
|
|
|
227
244
|
# Speech-to-text models this release knows.
|
|
228
245
|
KnownTranscribeModel = Literal[
|
|
229
246
|
"openai/gpt-4o-mini-transcribe",
|
|
230
|
-
"openai/whisper-1",
|
|
231
247
|
"relay/stt-1",
|
|
232
248
|
]
|