relaygpu-client 0.1.0__tar.gz → 0.1.2__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.0 → relaygpu_client-0.1.2}/CHANGELOG.md +21 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/PKG-INFO +4 -2
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/README.md +3 -1
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/pyproject.toml +1 -1
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/models.py +7 -7
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_generated/error_codes.py +84 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_generated/models_map.py +26 -27
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_generated/types.py +503 -9
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/models.py +7 -7
- relaygpu_client-0.1.2/relaygpu/_version.py +1 -0
- relaygpu_client-0.1.0/relaygpu/_version.py +0 -1
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/.gitignore +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/LICENSE +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/__init__.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/__init__.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/_http.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/account.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/audio.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/client.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/estimate.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/files.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/image.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/keys.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/run.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/tasks.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/video.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/webhooks.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_async/workflows.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_clock.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_core.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_errors.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_estimate.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_exceptions.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_generated/__init__.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_images.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_run_common.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_shapes.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/__init__.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/_http.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/account.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/audio.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/client.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/estimate.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/files.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/image.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/keys.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/run.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/tasks.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/video.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/webhooks.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_sync/workflows.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/_util.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/async_client.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/client.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/errors.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/inputs.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/py.typed +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/types.py +0 -0
- {relaygpu_client-0.1.0 → relaygpu_client-0.1.2}/relaygpu/webhooks.py +0 -0
|
@@ -3,6 +3,27 @@
|
|
|
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.2 (unreleased)
|
|
7
|
+
|
|
8
|
+
- **Catalog reads are account-aware.** `models.list`, `models.get`, `pricing.get` and `tiers.list` now send the
|
|
9
|
+
client's credential (`api_key` or `jwt`), so with one they return your account's view: the models your tier and
|
|
10
|
+
grants can run, beyond the public list. A client without a credential sends none and reads the public catalog,
|
|
11
|
+
unchanged. A key Relay refuses raises `AuthenticationError` on these reads, a key below the credit floor
|
|
12
|
+
`InsufficientCreditsError`. The `models.get` cache stays per client. `health`, task polls and workflow run polls
|
|
13
|
+
stay credential-free.
|
|
14
|
+
- **Generated types** follow the prod public spec of 2026-10-24: the Anthropic-compatible route is live again with no
|
|
15
|
+
public model list; the `doubao-seedance-2-0-filter-off` pair left the public model map.
|
|
16
|
+
|
|
17
|
+
## 0.1.1 (2026-10-22)
|
|
18
|
+
|
|
19
|
+
- **Generated types** follow the prod public spec of 2026-10-22: Claude is served through RelayConductor
|
|
20
|
+
(`relay/conductor` on the OpenAI-compatible route), so the Anthropic-compatible route lists no models;
|
|
21
|
+
`relay/music-1`, `relay/tts-1`, `relay/tts-1-turbo`, `relay/stt-1`, `MiniMax/MiniMax-H3`, `relay/conductor`,
|
|
22
|
+
`KlingTeam/v3-Omni` and `google/gemini-nano-banana-2.1` are in the model map; the Qwen image pair and
|
|
23
|
+
`google/gemini-3.5-flash` are gone.
|
|
24
|
+
- **Error statuses** for the OAuth, routing and `SERVICE_UNAVAILABLE` codes, so they map to their typed errors
|
|
25
|
+
instead of the status class.
|
|
26
|
+
|
|
6
27
|
## 0.1.0 (unreleased)
|
|
7
28
|
|
|
8
29
|
First release: a port of `@relaygpu/client` 0.1.0.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: relaygpu-client
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
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
|
|
@@ -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
|
|
|
@@ -325,6 +325,8 @@ knows also get `Literal` hints for autocomplete.
|
|
|
325
325
|
|
|
326
326
|
- An unknown name raises `ModelNotFoundError` (404); a retired one raises `ModelRetiredError` (403). Both
|
|
327
327
|
before anything is submitted or billed.
|
|
328
|
+
- With a credential the catalog reads (`models`, `pricing`, `tiers`) are your account's view: what your tier and
|
|
329
|
+
grants can run. Without one they are the public catalog. A refused key raises `AuthenticationError` on them.
|
|
328
330
|
- `relay.models.list(tag="text-to-video")` lists the catalog; `relay.models.get(name)` returns one model with
|
|
329
331
|
its `request_schema`, `request_example` and `pricing`.
|
|
330
332
|
- `run()` returns a sync route's body, or waits for an async route and returns the task's `result`.
|
|
@@ -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
|
|
|
@@ -293,6 +293,8 @@ knows also get `Literal` hints for autocomplete.
|
|
|
293
293
|
|
|
294
294
|
- An unknown name raises `ModelNotFoundError` (404); a retired one raises `ModelRetiredError` (403). Both
|
|
295
295
|
before anything is submitted or billed.
|
|
296
|
+
- With a credential the catalog reads (`models`, `pricing`, `tiers`) are your account's view: what your tier and
|
|
297
|
+
grants can run. Without one they are the public catalog. A refused key raises `AuthenticationError` on them.
|
|
296
298
|
- `relay.models.list(tag="text-to-video")` lists the catalog; `relay.models.get(name)` returns one model with
|
|
297
299
|
its `request_schema`, `request_example` and `pricing`.
|
|
298
300
|
- `run()` returns a sync route's body, or waits for an async route and returns the task's `result`.
|
|
@@ -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.2"
|
|
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
|
|
|
@@ -170,6 +170,18 @@ class ModelRetiredError(PermissionDeniedError):
|
|
|
170
170
|
"""`MODEL_RETIRED` (HTTP 403)."""
|
|
171
171
|
|
|
172
172
|
|
|
173
|
+
class OauthGrantNotFoundError(NotFoundError):
|
|
174
|
+
"""`OAUTH_GRANT_NOT_FOUND` (HTTP 404)."""
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class OauthTxnDecidedError(ConflictError):
|
|
178
|
+
"""`OAUTH_TXN_DECIDED` (HTTP 409)."""
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class OauthTxnNotFoundError(NotFoundError):
|
|
182
|
+
"""`OAUTH_TXN_NOT_FOUND` (HTTP 404)."""
|
|
183
|
+
|
|
184
|
+
|
|
173
185
|
class PaymentServiceUnavailableError(CapacityError):
|
|
174
186
|
"""`PAYMENT_SERVICE_UNAVAILABLE` (HTTP 503)."""
|
|
175
187
|
|
|
@@ -214,10 +226,54 @@ class RefundNotFoundError(NotFoundError):
|
|
|
214
226
|
"""`REFUND_NOT_FOUND` (HTTP 404)."""
|
|
215
227
|
|
|
216
228
|
|
|
229
|
+
class RoutingDocNotFoundError(NotFoundError):
|
|
230
|
+
"""`ROUTING_DOC_NOT_FOUND` (HTTP 404)."""
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
class RoutingEngineUnknownError(ValidationError):
|
|
234
|
+
"""`ROUTING_ENGINE_UNKNOWN` (HTTP 422)."""
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
class RoutingListTooLongError(ValidationError):
|
|
238
|
+
"""`ROUTING_LIST_TOO_LONG` (HTTP 422)."""
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
class RoutingListUnknownError(ValidationError):
|
|
242
|
+
"""`ROUTING_LIST_UNKNOWN` (HTTP 422)."""
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
class RoutingModelRestrictedError(PermissionDeniedError):
|
|
246
|
+
"""`ROUTING_MODEL_RESTRICTED` (HTTP 403)."""
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
class RoutingModelUnknownError(ValidationError):
|
|
250
|
+
"""`ROUTING_MODEL_UNKNOWN` (HTTP 422)."""
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
class RoutingModelUnscoredError(ValidationError):
|
|
254
|
+
"""`ROUTING_MODEL_UNSCORED` (HTTP 422)."""
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
class RoutingModelVetoedError(ValidationError):
|
|
258
|
+
"""`ROUTING_MODEL_VETOED` (HTTP 422)."""
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
class RoutingNoCandidatesError(ValidationError):
|
|
262
|
+
"""`ROUTING_NO_CANDIDATES` (HTTP 422)."""
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
class RoutingOnFixedModelError(ValidationError):
|
|
266
|
+
"""`ROUTING_ON_FIXED_MODEL` (HTTP 422)."""
|
|
267
|
+
|
|
268
|
+
|
|
217
269
|
class ScopeDeniedError(PermissionDeniedError):
|
|
218
270
|
"""`SCOPE_DENIED` (HTTP 403)."""
|
|
219
271
|
|
|
220
272
|
|
|
273
|
+
class ServiceUnavailableError(CapacityError):
|
|
274
|
+
"""`SERVICE_UNAVAILABLE` (HTTP 503)."""
|
|
275
|
+
|
|
276
|
+
|
|
221
277
|
class SuperkeyConflictError(ConflictError):
|
|
222
278
|
"""`SUPERKEY_CONFLICT` (HTTP 409)."""
|
|
223
279
|
|
|
@@ -306,6 +362,9 @@ ERROR_CODE_CLASSES: dict[str, type[RelayAPIError]] = {
|
|
|
306
362
|
"MODEL_NOT_AVAILABLE": ModelNotAvailableError,
|
|
307
363
|
"MODEL_NOT_FOUND": ModelNotFoundError,
|
|
308
364
|
"MODEL_RETIRED": ModelRetiredError,
|
|
365
|
+
"OAUTH_GRANT_NOT_FOUND": OauthGrantNotFoundError,
|
|
366
|
+
"OAUTH_TXN_DECIDED": OauthTxnDecidedError,
|
|
367
|
+
"OAUTH_TXN_NOT_FOUND": OauthTxnNotFoundError,
|
|
309
368
|
"PAYMENT_SERVICE_UNAVAILABLE": PaymentServiceUnavailableError,
|
|
310
369
|
"PROMO_ALREADY_REDEEMED": PromoAlreadyRedeemedError,
|
|
311
370
|
"PROMO_CODE_EXHAUSTED": PromoCodeExhaustedError,
|
|
@@ -317,7 +376,18 @@ ERROR_CODE_CLASSES: dict[str, type[RelayAPIError]] = {
|
|
|
317
376
|
"RECEIVABLE_LIMIT_EXCEEDED": ReceivableLimitExceededError,
|
|
318
377
|
"RECEIVABLE_OVERDUE": ReceivableOverdueError,
|
|
319
378
|
"REFUND_NOT_FOUND": RefundNotFoundError,
|
|
379
|
+
"ROUTING_DOC_NOT_FOUND": RoutingDocNotFoundError,
|
|
380
|
+
"ROUTING_ENGINE_UNKNOWN": RoutingEngineUnknownError,
|
|
381
|
+
"ROUTING_LIST_TOO_LONG": RoutingListTooLongError,
|
|
382
|
+
"ROUTING_LIST_UNKNOWN": RoutingListUnknownError,
|
|
383
|
+
"ROUTING_MODEL_RESTRICTED": RoutingModelRestrictedError,
|
|
384
|
+
"ROUTING_MODEL_UNKNOWN": RoutingModelUnknownError,
|
|
385
|
+
"ROUTING_MODEL_UNSCORED": RoutingModelUnscoredError,
|
|
386
|
+
"ROUTING_MODEL_VETOED": RoutingModelVetoedError,
|
|
387
|
+
"ROUTING_NO_CANDIDATES": RoutingNoCandidatesError,
|
|
388
|
+
"ROUTING_ON_FIXED_MODEL": RoutingOnFixedModelError,
|
|
320
389
|
"SCOPE_DENIED": ScopeDeniedError,
|
|
390
|
+
"SERVICE_UNAVAILABLE": ServiceUnavailableError,
|
|
321
391
|
"SUPERKEY_CONFLICT": SuperkeyConflictError,
|
|
322
392
|
"SYSTEM_KEY_IMMUTABLE": SystemKeyImmutableError,
|
|
323
393
|
"TASK_NOT_FOUND": TaskNotFoundError,
|
|
@@ -373,6 +443,9 @@ __all__ = [
|
|
|
373
443
|
"ModelNotAvailableError",
|
|
374
444
|
"ModelNotFoundError",
|
|
375
445
|
"ModelRetiredError",
|
|
446
|
+
"OauthGrantNotFoundError",
|
|
447
|
+
"OauthTxnDecidedError",
|
|
448
|
+
"OauthTxnNotFoundError",
|
|
376
449
|
"PaymentServiceUnavailableError",
|
|
377
450
|
"PromoAlreadyRedeemedError",
|
|
378
451
|
"PromoCodeExhaustedError",
|
|
@@ -384,7 +457,18 @@ __all__ = [
|
|
|
384
457
|
"ReceivableLimitExceededError",
|
|
385
458
|
"ReceivableOverdueError",
|
|
386
459
|
"RefundNotFoundError",
|
|
460
|
+
"RoutingDocNotFoundError",
|
|
461
|
+
"RoutingEngineUnknownError",
|
|
462
|
+
"RoutingListTooLongError",
|
|
463
|
+
"RoutingListUnknownError",
|
|
464
|
+
"RoutingModelRestrictedError",
|
|
465
|
+
"RoutingModelUnknownError",
|
|
466
|
+
"RoutingModelUnscoredError",
|
|
467
|
+
"RoutingModelVetoedError",
|
|
468
|
+
"RoutingNoCandidatesError",
|
|
469
|
+
"RoutingOnFixedModelError",
|
|
387
470
|
"ScopeDeniedError",
|
|
471
|
+
"ServiceUnavailableError",
|
|
388
472
|
"SuperkeyConflictError",
|
|
389
473
|
"SystemKeyImmutableError",
|
|
390
474
|
"TaskNotFoundError",
|
|
@@ -8,37 +8,28 @@ from typing import Literal
|
|
|
8
8
|
|
|
9
9
|
# Live model names per tag → the operation that serves them (from `x-relay-models`).
|
|
10
10
|
MODEL_OPERATIONS: dict[str, dict[str, str]] = {
|
|
11
|
-
"Anthropic": {
|
|
12
|
-
"anthropic/claude-fable-5": "anthropic_messages",
|
|
13
|
-
"anthropic/claude-fable-5-1": "anthropic_messages",
|
|
14
|
-
"anthropic/claude-haiku-4-5-20251001": "anthropic_messages",
|
|
15
|
-
"anthropic/claude-opus-4-6": "anthropic_messages",
|
|
16
|
-
"anthropic/claude-opus-4-7": "anthropic_messages",
|
|
17
|
-
"anthropic/claude-opus-4-8": "anthropic_messages",
|
|
18
|
-
"anthropic/claude-opus-5": "anthropic_messages",
|
|
19
|
-
"anthropic/claude-opus-5-5": "anthropic_messages",
|
|
20
|
-
"anthropic/claude-sonnet-4-6": "anthropic_messages",
|
|
21
|
-
"anthropic/claude-sonnet-5": "anthropic_messages",
|
|
22
|
-
},
|
|
23
11
|
"Audio": {
|
|
24
12
|
"IndexTeam/IndexTTS-2": "audio_index_tts_2_generate",
|
|
25
13
|
"MiniMax/speech-2.8-hd": "audio_minimax_speech_2_8_hd_generate",
|
|
26
14
|
"Qwen/qwen3-tts-flash": "audio_qwen3_tts_flash_generate",
|
|
27
15
|
"openai/gpt-4o-mini-transcribe": "audio_asr_whisper",
|
|
28
16
|
"openai/whisper-1": "audio_asr_whisper",
|
|
17
|
+
"relay/music-1": "audio_music_1_generate",
|
|
18
|
+
"relay/stt-1": "audio_asr_whisper",
|
|
19
|
+
"relay/tts-1": "audio_tts_1_generate",
|
|
20
|
+
"relay/tts-1-turbo": "audio_tts_1_turbo_generate",
|
|
29
21
|
},
|
|
30
22
|
"Embeddings": {
|
|
31
23
|
"openai/text-embedding-3-small": "openai_embeddings",
|
|
32
24
|
},
|
|
33
25
|
"Image": {
|
|
34
26
|
"ByteDance/doubao-seedream-5-0-pro-260628": "image_seedream_5_0_pro_generate",
|
|
35
|
-
"Qwen/qwen-image": "image_qwen_generate",
|
|
36
|
-
"Qwen/qwen-image-edit": "image_qwen_edit",
|
|
37
27
|
"Wan-AI/Wan2.7-Image-Pro": "image_wan_2_7_image_pro_generate",
|
|
38
28
|
"black-forest-labs/FLUX-2-pro": "image_flux_generate",
|
|
39
29
|
"google/gemini-2.5-flash-image": "image_gemini_3_generate",
|
|
40
30
|
"google/gemini-3-pro-image": "image_gemini_3_generate",
|
|
41
31
|
"google/gemini-3.1-flash-image-preview": "image_gemini_3_generate",
|
|
32
|
+
"google/gemini-nano-banana-2.1": "image_gemini_3_generate",
|
|
42
33
|
"openai/gpt-image-1.5-I2I": "image_gpt_image_edit",
|
|
43
34
|
"openai/gpt-image-1.5-T2I": "image_gpt_image_generate",
|
|
44
35
|
"openai/gpt-image-2": "image_gpt_image_2_generate",
|
|
@@ -53,7 +44,6 @@ MODEL_OPERATIONS: dict[str, dict[str, str]] = {
|
|
|
53
44
|
"deepseek-ai/DeepSeek-V4-Flash": "openai_chat_completions",
|
|
54
45
|
"deepseek-ai/DeepSeek-V4-Pro": "openai_chat_completions",
|
|
55
46
|
"deepseek-ai/DeepSeek-V4.1-Flash": "openai_chat_completions",
|
|
56
|
-
"google/gemini-3.5-flash": "openai_chat_completions",
|
|
57
47
|
"google/gemma-4-26b-a4b-it": "openai_chat_completions",
|
|
58
48
|
"google/gemma-4-31B-turbo": "openai_chat_completions",
|
|
59
49
|
"moonshotai/kimi-k2.6": "openai_chat_completions",
|
|
@@ -65,6 +55,7 @@ MODEL_OPERATIONS: dict[str, dict[str, str]] = {
|
|
|
65
55
|
"openai/gpt-5.5": "openai_chat_completions",
|
|
66
56
|
"openai/gpt-5.5-pro": "openai_chat_completions",
|
|
67
57
|
"openai/gpt-6-astra": "openai_chat_completions",
|
|
58
|
+
"relay/conductor": "openai_chat_completions",
|
|
68
59
|
"x-ai/grok-4.3": "openai_chat_completions",
|
|
69
60
|
"zai-org/glm-5.1": "openai_chat_completions",
|
|
70
61
|
"zai-org/glm-5.2": "openai_chat_completions",
|
|
@@ -76,8 +67,6 @@ MODEL_OPERATIONS: dict[str, dict[str, str]] = {
|
|
|
76
67
|
"ByteDance/doubao-seedance-2-0-260128-V2V": "video_doubao_seedance_2_0_v2v_generate",
|
|
77
68
|
"ByteDance/doubao-seedance-2-0-fast": "video_doubao_seedance_2_0_fast_generate",
|
|
78
69
|
"ByteDance/doubao-seedance-2-0-fast-V2V": "video_doubao_seedance_2_0_fast_v2v_generate",
|
|
79
|
-
"ByteDance/doubao-seedance-2-0-filter-off": "video_doubao_seedance_2_0_filter_off_generate",
|
|
80
|
-
"ByteDance/doubao-seedance-2-0-filter-off-V2V": "video_doubao_seedance_2_0_filter_off_v2v_generate",
|
|
81
70
|
"ByteDance/doubao-seedance-2-0-mini-260615": "video_doubao_seedance_2_0_mini_generate",
|
|
82
71
|
"ByteDance/doubao-seedance-2-0-mini-260615-V2V": "video_doubao_seedance_2_0_mini_v2v_generate",
|
|
83
72
|
"ByteDance/doubao-seedance-2-5-260628": "video_doubao_seedance_2_5_generate",
|
|
@@ -91,7 +80,9 @@ MODEL_OPERATIONS: dict[str, dict[str, str]] = {
|
|
|
91
80
|
"KlingTeam/kling-video-o1": "video_kling_o1_generate",
|
|
92
81
|
"KlingTeam/v3-I2V": "video_kling_3_i2v",
|
|
93
82
|
"KlingTeam/v3-Motion-Control": "video_kling_3_motion_control",
|
|
83
|
+
"KlingTeam/v3-Omni": "video_kling_3_omni",
|
|
94
84
|
"KlingTeam/v3-T2V": "video_kling_3_t2v",
|
|
85
|
+
"MiniMax/MiniMax-H3": "video_minimax_h3_generate",
|
|
95
86
|
"Wan-AI/Wan2.5-I2V": "video_wan_25_i2v",
|
|
96
87
|
"Wan-AI/Wan2.5-T2V": "video_wan_25_t2v",
|
|
97
88
|
"Wan-AI/Wan2.6-T2V": "video_wan_26_t2v",
|
|
@@ -106,7 +97,10 @@ OPERATION_REQUEST_SCHEMAS: dict[str, str] = {
|
|
|
106
97
|
"audio_asr_whisper": "ASRRequest",
|
|
107
98
|
"audio_index_tts_2_generate": "IndexTts2Request",
|
|
108
99
|
"audio_minimax_speech_2_8_hd_generate": "MinimaxSpeech28HdRequest",
|
|
100
|
+
"audio_music_1_generate": "MusicGenerateRequest",
|
|
109
101
|
"audio_qwen3_tts_flash_generate": "Qwen3TtsFlashRequest",
|
|
102
|
+
"audio_tts_1_generate": "RelayTtsRequest",
|
|
103
|
+
"audio_tts_1_turbo_generate": "RelayTtsRequest",
|
|
110
104
|
"customer_keys_create": "CreateKeyRequest",
|
|
111
105
|
"customer_keys_topup": "KeyBudgetTopupRequest",
|
|
112
106
|
"customer_keys_update": "UpdateKeyRequest",
|
|
@@ -129,15 +123,15 @@ OPERATION_REQUEST_SCHEMAS: dict[str, str] = {
|
|
|
129
123
|
"openai_embeddings": "EmbeddingRequest",
|
|
130
124
|
"video_bria_upscale_generate": "BriaVideoUpscaleRequest",
|
|
131
125
|
"video_doubao_seedance_1_5_pro_generate": "DoubaoSeedance15ProRequest",
|
|
132
|
-
"video_doubao_seedance_2_0_fast_filter_off_generate": "
|
|
133
|
-
"video_doubao_seedance_2_0_fast_filter_off_v2v_generate": "
|
|
134
|
-
"video_doubao_seedance_2_0_fast_generate": "
|
|
135
|
-
"video_doubao_seedance_2_0_fast_v2v_generate": "
|
|
126
|
+
"video_doubao_seedance_2_0_fast_filter_off_generate": "DoubaoSeedance20Up720pRequest",
|
|
127
|
+
"video_doubao_seedance_2_0_fast_filter_off_v2v_generate": "DoubaoSeedance20Up720pV2VRequest",
|
|
128
|
+
"video_doubao_seedance_2_0_fast_generate": "DoubaoSeedance20Up720pRequest",
|
|
129
|
+
"video_doubao_seedance_2_0_fast_v2v_generate": "DoubaoSeedance20Up720pV2VRequest",
|
|
136
130
|
"video_doubao_seedance_2_0_filter_off_generate": "DoubaoSeedance20Request",
|
|
137
131
|
"video_doubao_seedance_2_0_filter_off_v2v_generate": "DoubaoSeedanceV2VRequest",
|
|
138
132
|
"video_doubao_seedance_2_0_generate": "DoubaoSeedance20Request",
|
|
139
|
-
"video_doubao_seedance_2_0_mini_generate": "
|
|
140
|
-
"video_doubao_seedance_2_0_mini_v2v_generate": "
|
|
133
|
+
"video_doubao_seedance_2_0_mini_generate": "DoubaoSeedance20Up720pRequest",
|
|
134
|
+
"video_doubao_seedance_2_0_mini_v2v_generate": "DoubaoSeedance20Up720pV2VRequest",
|
|
141
135
|
"video_doubao_seedance_2_0_v2v_generate": "DoubaoSeedanceV2VRequest",
|
|
142
136
|
"video_doubao_seedance_2_5_generate": "DoubaoSeedance25Request",
|
|
143
137
|
"video_doubao_seedance_2_5_v2v_generate": "DoubaoSeedance25V2VRequest",
|
|
@@ -151,10 +145,12 @@ OPERATION_REQUEST_SCHEMAS: dict[str, str] = {
|
|
|
151
145
|
"video_kling_26_t2v": "KlingT2VRequest",
|
|
152
146
|
"video_kling_3_i2v": "KlingV3I2VRequest",
|
|
153
147
|
"video_kling_3_motion_control": "KlingV3MotionControlRequest",
|
|
148
|
+
"video_kling_3_omni": "KlingV3OmniRequest",
|
|
154
149
|
"video_kling_3_t2v": "KlingV3T2VRequest",
|
|
155
150
|
"video_kling_o1_generate": "KlingO1Request",
|
|
156
151
|
"video_lucy_2_5_generate": "Lucy25Request",
|
|
157
152
|
"video_lucy_vton_3_generate": "LucyVton3Request",
|
|
153
|
+
"video_minimax_h3_generate": "MiniMaxH3Request",
|
|
158
154
|
"video_sora_2_i2v": "SoraI2VRequest",
|
|
159
155
|
"video_sora_2_pro_i2v": "SoraProI2VRequest",
|
|
160
156
|
"video_sora_2_pro_t2v": "SoraProT2VRequest",
|
|
@@ -171,13 +167,12 @@ OPERATION_REQUEST_SCHEMAS: dict[str, str] = {
|
|
|
171
167
|
# Image models this release knows (any other name works too).
|
|
172
168
|
KnownImageModel = Literal[
|
|
173
169
|
"ByteDance/doubao-seedream-5-0-pro-260628",
|
|
174
|
-
"Qwen/qwen-image",
|
|
175
|
-
"Qwen/qwen-image-edit",
|
|
176
170
|
"Wan-AI/Wan2.7-Image-Pro",
|
|
177
171
|
"black-forest-labs/FLUX-2-pro",
|
|
178
172
|
"google/gemini-2.5-flash-image",
|
|
179
173
|
"google/gemini-3-pro-image",
|
|
180
174
|
"google/gemini-3.1-flash-image-preview",
|
|
175
|
+
"google/gemini-nano-banana-2.1",
|
|
181
176
|
"openai/gpt-image-1.5-I2I",
|
|
182
177
|
"openai/gpt-image-1.5-T2I",
|
|
183
178
|
"openai/gpt-image-2",
|
|
@@ -192,8 +187,6 @@ KnownVideoModel = Literal[
|
|
|
192
187
|
"ByteDance/doubao-seedance-2-0-260128-V2V",
|
|
193
188
|
"ByteDance/doubao-seedance-2-0-fast",
|
|
194
189
|
"ByteDance/doubao-seedance-2-0-fast-V2V",
|
|
195
|
-
"ByteDance/doubao-seedance-2-0-filter-off",
|
|
196
|
-
"ByteDance/doubao-seedance-2-0-filter-off-V2V",
|
|
197
190
|
"ByteDance/doubao-seedance-2-0-mini-260615",
|
|
198
191
|
"ByteDance/doubao-seedance-2-0-mini-260615-V2V",
|
|
199
192
|
"ByteDance/doubao-seedance-2-5-260628",
|
|
@@ -207,7 +200,9 @@ KnownVideoModel = Literal[
|
|
|
207
200
|
"KlingTeam/kling-video-o1",
|
|
208
201
|
"KlingTeam/v3-I2V",
|
|
209
202
|
"KlingTeam/v3-Motion-Control",
|
|
203
|
+
"KlingTeam/v3-Omni",
|
|
210
204
|
"KlingTeam/v3-T2V",
|
|
205
|
+
"MiniMax/MiniMax-H3",
|
|
211
206
|
"Wan-AI/Wan2.5-I2V",
|
|
212
207
|
"Wan-AI/Wan2.5-T2V",
|
|
213
208
|
"Wan-AI/Wan2.6-T2V",
|
|
@@ -220,10 +215,14 @@ KnownSpeechModel = Literal[
|
|
|
220
215
|
"IndexTeam/IndexTTS-2",
|
|
221
216
|
"MiniMax/speech-2.8-hd",
|
|
222
217
|
"Qwen/qwen3-tts-flash",
|
|
218
|
+
"relay/music-1",
|
|
219
|
+
"relay/tts-1",
|
|
220
|
+
"relay/tts-1-turbo",
|
|
223
221
|
]
|
|
224
222
|
|
|
225
223
|
# Speech-to-text models this release knows.
|
|
226
224
|
KnownTranscribeModel = Literal[
|
|
227
225
|
"openai/gpt-4o-mini-transcribe",
|
|
228
226
|
"openai/whisper-1",
|
|
227
|
+
"relay/stt-1",
|
|
229
228
|
]
|