langchain-wavespeed
LangChain integration for WaveSpeed AI — run state-of-the-art image and video generation models from your LangChain agents and chains.
Installation
pip install -U langchain-wavespeed
Set your API key (get one at wavespeed.ai):
export WAVESPEED_API_KEY="your-api-key"
Tools
WaveSpeedImageGeneration
Generate images from text prompts (defaults to bytedance/seedream-v5.0-pro):
from langchain_wavespeed import WaveSpeedImageGeneration
tool = WaveSpeedImageGeneration()
url = tool.invoke({"prompt": "A red panda drinking boba tea, studio lighting"})
print(url) # https://.../output.png
WaveSpeedVideoGeneration
Generate videos from text prompts (defaults to bytedance/seedance-2.5/text-to-video):
from langchain_wavespeed import WaveSpeedVideoGeneration
tool = WaveSpeedVideoGeneration()
url = tool.invoke({"prompt": "A drone shot over a glacier at sunrise", "duration": 5})
WaveSpeedRunModel
Run any model on the WaveSpeed platform by id (browse the catalog at wavespeed.ai/models):
from langchain_wavespeed import WaveSpeedRunModel
tool = WaveSpeedRunModel()
url = tool.invoke({
"model": "wavespeed-ai/z-image/turbo",
"input": {"prompt": "A lighthouse at dusk"},
})
Use with an agent
from langchain.agents import create_agent
from langchain_wavespeed import WaveSpeedImageGeneration, WaveSpeedVideoGeneration
agent = create_agent(
"openai:gpt-5",
tools=[WaveSpeedImageGeneration(), WaveSpeedVideoGeneration()],
)
result = agent.invoke(
{"messages": [{"role": "user", "content": "Make me a picture of a corgi surfing."}]}
)
Configuration
All tools accept:
| Parameter | Default | Description |
|---|---|---|
api_key |
WAVESPEED_API_KEY env var |
WaveSpeed API key |
model |
tool-specific | Model id to run (image/video tools) |
timeout |
None |
Max seconds to wait for a prediction |
poll_interval |
1.0 |
Seconds between result polls |
Async is supported out of the box via await tool.ainvoke(...).
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_wavespeed-0.1.0.tar.gz.
File metadata
- Download URL: langchain_wavespeed-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebbf590361e22fcb06a48dd284273e7a804fe37953f5dbcab12daf91cbdcd6f4
|
|
| MD5 |
0b7d21089808a5b4db035f4ef24ab66a
|
|
| BLAKE2b-256 |
9a6ea401e4848344be8f7425770d7810862f0fae32bf0785f3e71def688081b9
|
Provenance
The following attestation bundles were made for langchain_wavespeed-0.1.0.tar.gz:
Publisher:
python-publish.yml on WaveSpeedAI/langchain-wavespeed
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_wavespeed-0.1.0.tar.gz -
Subject digest:
ebbf590361e22fcb06a48dd284273e7a804fe37953f5dbcab12daf91cbdcd6f4 - Sigstore transparency entry: 2527306184
- Sigstore integration time:
-
Permalink:
WaveSpeedAI/langchain-wavespeed@7ce22b0eec0c1a62678f502306f8c75dda1a0eb0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/WaveSpeedAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7ce22b0eec0c1a62678f502306f8c75dda1a0eb0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file langchain_wavespeed-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_wavespeed-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b011bd1cae0094434b45a10c7235aee0521472c46445d7f46b190953ee063c7
|
|
| MD5 |
c4d1b4ffa1041d828bf48507925e22d1
|
|
| BLAKE2b-256 |
1cedfd08607874f37479cb60d10459b7bf8ff8520357344d56cd2e210de4bbab
|
Provenance
The following attestation bundles were made for langchain_wavespeed-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on WaveSpeedAI/langchain-wavespeed
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_wavespeed-0.1.0-py3-none-any.whl -
Subject digest:
4b011bd1cae0094434b45a10c7235aee0521472c46445d7f46b190953ee063c7 - Sigstore transparency entry: 2527306349
- Sigstore integration time:
-
Permalink:
WaveSpeedAI/langchain-wavespeed@7ce22b0eec0c1a62678f502306f8c75dda1a0eb0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/WaveSpeedAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7ce22b0eec0c1a62678f502306f8c75dda1a0eb0 -
Trigger Event:
release
-
Statement type: