Midjourney Python SDK for RunAPI
Use runapi-midjourney for Midjourney image generation, editing, image-to-video, first-video extension, image-to-prompt, prompt shortening, and seed lookup in Python applications and workers.
Install
pip install runapi-midjourney
Quick Start
from runapi.midjourney import MidjourneyClient
client = MidjourneyClient()
result = client.text_to_image.run(
model="midjourney-v8.1",
prompt="A cobalt blue ceramic vase on white marble",
)
print(result.images[0].url)
Use create, get, and run for text_to_image, edit_image, image_to_video, and extend_video. extend_video accepts the task ID of an account-owned completed direct image-to-video task and continues its first video; extension tasks cannot be chained. Use run directly for image_to_prompt, shorten_prompt, and get_seed; it returns the same typed terminal result whether the request completes directly or is accepted for background processing. Call subscribe(location) on one of these resources to resume an accepted request from its opaque Task Result URL. Generated media URLs are temporary and should be stored in durable storage.
Links
- Model page: https://runapi.ai/models/midjourney
- Product docs: https://runapi.ai/docs/api/midjourney/text-to-image
- SDK docs: https://runapi.ai/docs/resources/sdks
- V8.1 details: https://runapi.ai/models/midjourney/v8.1
- Image editing details: https://runapi.ai/models/midjourney/edit-image
- Image-to-video details: https://runapi.ai/models/midjourney/image-to-video
- Repository: https://github.com/runapi-ai/midjourney-sdk
Licensed under the Apache License, Version 2.0.
Metadata
Release files for runapi-midjourney 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| runapi_midjourney-0.6.0.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| runapi_midjourney-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.7 kB
Release files / runapi_midjourney-0.6.0.tar.gz
| Download URL | runapi_midjourney-0.6.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6ae3bd609fe70615c8ca7de6e42bdf9985e926646a6b8e58e6f6ac34a9d42d2
|
|
BLAKE2b-256 checksum How to use checksums |
51d2304275bd6f5ebc9225d2e7a279ff7084566a22f54da2b1c544cda78c569c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / runapi_midjourney-0.6.0-py3-none-any.whl
| Download URL | runapi_midjourney-0.6.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e494864aec9d8c2b848b1c7c597ec562c60da486bbd8b1736e8bcdc726b889d
|
|
BLAKE2b-256 checksum How to use checksums |
57738f27df63284a9a6f89db335bc88da95561d9e51ae08b7a24cf9ee1a1b37d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|