Skip to content

Commit f9977e2

Browse files
committed
fix: README
1 parent 720235a commit f9977e2

1 file changed

Lines changed: 27 additions & 26 deletions

File tree

README.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ from runware import Runware
3030
async def main() -> None:
3131
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
3232
results = await client.run({
33-
"model": "runware:101@1",
33+
"model": "runware:400@1",
3434
"positivePrompt": "A serene mountain landscape at sunset",
3535
"width": 1024,
3636
"height": 1024,
@@ -40,7 +40,7 @@ async def main() -> None:
4040
asyncio.run(main())
4141
```
4242

43-
The SDK resolves `runware:101@1` to the right task type automatically. `RUNWARE_API_KEY` is read from the environment if you don't pass `api_key=...` explicitly.
43+
The SDK resolves `runware:400@1` to the right task type automatically. `RUNWARE_API_KEY` is read from the environment if you don't pass `api_key=...` explicitly.
4444

4545
More runnable patterns in [`examples/`](./examples/) — curated models, community fine-tunes, streaming, the WebSocket transport.
4646

@@ -53,28 +53,29 @@ Every inference task goes through `.run()`. The SDK determines the task type fro
5353
```python
5454
# Image generation
5555
images = await client.run({
56-
"model": "runware:101@1",
56+
"model": "runware:400@1",
5757
"positivePrompt": "Abstract digital art",
5858
"width": 1024, "height": 1024,
5959
})
6060

6161
# Video generation
6262
videos = await client.run({
63-
"model": "klingai:5@3",
63+
"model": "google:3@3",
6464
"positivePrompt": "Ocean waves at sunset",
65-
"duration": 10,
65+
"duration": 8,
6666
})
6767

6868
# Text inference (LLM)
6969
responses = await client.run({
70-
"model": "openai:o1@0",
70+
"model": "google:gemma@4-31b",
7171
"messages": [{"role": "user", "content": "Explain quantum computing"}],
7272
})
7373

74-
# Audio generation
74+
# Audio generation (designs a voice from the prompt, then speaks the text)
7575
audio = await client.run({
76-
"model": "alibaba:qwen@3-tts-1.7b-base",
77-
"text": "Hello world",
76+
"model": "alibaba:qwen@3-tts-1.7b-voicedesign",
77+
"positivePrompt": "A calm, friendly young woman with a soft tone",
78+
"speech": {"text": "Hello world", "voice": "design"},
7879
})
7980
```
8081

@@ -86,7 +87,7 @@ When you know the architecture, import its `Params` TypedDict from `runware.type
8687
from runware.types.task_map import SdxlParams
8788

8889
params: SdxlParams = {
89-
"model": "civitai:101055@128078",
90+
"model": "civitai:133005@782002",
9091
"taskType": "imageInference",
9192
"positivePrompt": "A professional headshot portrait",
9293
"negativePrompt": "blurry, distorted",
@@ -122,12 +123,12 @@ Validation (when enabled) automatically picks the right schema for the AIR — n
122123

123124
### Curated-model slugs
124125

125-
The registry indexes every curated model under both its AIR (`runware:101@1`) and its slug (`flux-1-dev`). You can pass either:
126+
The registry indexes every curated model under both its AIR (`runware:400@1`) and its slug (`bfl-flux-2-dev`). You can pass either:
126127

127128
```python
128129
# Both call the same model.
129-
await client.run({"model": "runware:101@1", "positivePrompt": "..."})
130-
await client.run({"model": "flux-1-dev", "positivePrompt": "..."})
130+
await client.run({"model": "runware:400@1", "positivePrompt": "..."})
131+
await client.run({"model": "bfl-flux-2-dev", "positivePrompt": "..."})
131132
```
132133

133134
The SDK rewrites slugs to canonical AIRs before sending. Non-curated identifiers (custom fine-tunes, unknown strings) pass through unchanged.
@@ -138,7 +139,7 @@ For text models, `.stream()` delivers tokens as they're generated:
138139

139140
```python
140141
stream = await client.stream({
141-
"model": "minimax:m2.7@0",
142+
"model": "google:gemma@4-31b",
142143
"messages": [{"role": "user", "content": "Tell me a story about a robot"}],
143144
})
144145

@@ -150,7 +151,7 @@ async for word in stream.text_stream:
150151

151152
```python
152153
stream = await client.stream({
153-
"model": "minimax:m2.7@0",
154+
"model": "google:gemma@4-31b",
154155
"messages": [{"role": "user", "content": "Explain gravity"}],
155156
})
156157

@@ -183,8 +184,8 @@ Best when you make multiple requests or want real-time feedback:
183184

184185
```python
185186
async with Runware(transport_type="websocket") as client:
186-
images = await client.run({"model": "runware:101@1", "positivePrompt": "..."})
187-
videos = await client.run({"model": "klingai:5@3", "positivePrompt": "..."})
187+
images = await client.run({"model": "runware:400@1", "positivePrompt": "..."})
188+
videos = await client.run({"model": "google:3@3", "positivePrompt": "..."})
188189
```
189190

190191
WebSocket connections are automatically recovered on network interruptions. The SDK re-authenticates with the same session UUID and the server replays pending results.
@@ -196,7 +197,7 @@ Best for serverless functions or one-off requests:
196197
```python
197198
async with Runware(transport_type="rest") as client:
198199
images = await client.run({
199-
"model": "runware:101@1",
200+
"model": "runware:400@1",
200201
"positivePrompt": "A landscape painting",
201202
"width": 1024, "height": 1024,
202203
})
@@ -212,7 +213,7 @@ import asyncio
212213
async with Runware() as client:
213214
images, upscaled, caption = await asyncio.gather(
214215
client.run({
215-
"model": "runware:101@1",
216+
"model": "runware:400@1",
216217
"positivePrompt": "Abstract art",
217218
"numberResults": 3,
218219
}),
@@ -251,7 +252,7 @@ async def main() -> None:
251252

252253
try:
253254
await client.run(
254-
{"model": "runware:101@1", "positivePrompt": "A detailed scene"},
255+
{"model": "runware:400@1", "positivePrompt": "A detailed scene"},
255256
RunOptions(cancel_event=cancel),
256257
)
257258
except RunwareError as exc:
@@ -265,7 +266,7 @@ For streams, set the cancel event to end iteration:
265266
from runware import StreamOptions
266267

267268
stream = await client.stream(
268-
{"model": "minimax:m2.7@0", "messages": [{"role": "user", "content": "..."}]},
269+
{"model": "google:gemma@4-31b", "messages": [{"role": "user", "content": "..."}]},
269270
StreamOptions(cancel_event=cancel),
270271
)
271272
async for word in stream.text_stream:
@@ -294,7 +295,7 @@ def progress(item: dict) -> None:
294295
print(f"{item.get('progress')}%")
295296

296297
results = await client.run(
297-
{"model": "klingai:5@3", "positivePrompt": "Ocean waves", "numberResults": 3},
298+
{"model": "google:3@3", "positivePrompt": "Ocean waves", "numberResults": 3},
298299
RunOptions(on_result=watch, on_progress=progress),
299300
)
300301
```
@@ -311,7 +312,7 @@ from runware import Runware, RunwareError
311312
async with Runware() as client:
312313
try:
313314
results = await client.run({
314-
"model": "runware:101@1",
315+
"model": "runware:400@1",
315316
"positivePrompt": "A detailed rendering",
316317
})
317318
except RunwareError as exc:
@@ -429,7 +430,7 @@ Or per-call via `RunOptions`:
429430

430431
```python
431432
videos = await client.run(
432-
{"model": "klingai:5@3", "positivePrompt": "Ocean waves"},
433+
{"model": "google:3@3", "positivePrompt": "Ocean waves"},
433434
RunOptions(timeout=600_000),
434435
)
435436
```
@@ -440,7 +441,7 @@ For fast tasks (text inference, fast image gen, captioning) you can skip the pol
440441

441442
```python
442443
responses = await client.run({
443-
"model": "openai:gpt-5@0",
444+
"model": "google:gemma@4-31b",
444445
"messages": [{"role": "user", "content": "Hello"}],
445446
"deliveryMethod": "sync",
446447
})
@@ -459,7 +460,7 @@ The second argument to `client.run()` and `client.stream()` is a `RunOptions` /
459460
from runware import RunOptions
460461

461462
await client.run(
462-
{"model": "runware:101@1", "positivePrompt": "A landscape"},
463+
{"model": "runware:400@1", "positivePrompt": "A landscape"},
463464
RunOptions(
464465
timeout=600_000, # ms — override config.poll_timeout for this call
465466
cancel_event=cancel, # asyncio.Event — cancel this call

0 commit comments

Comments
 (0)