Metadata-Version: 2.5
Name: langchain-freeimagetovideo
Version: 0.1.0
Summary: Free image to video AI with no daily cap: start with no sign-up, keep going on a free account. Every video comes with sound and no watermark. This is the official LangChain integration for Free Image to Video: text to video and image to video tools for agents.
Project-URL: Homepage, https://freeimagetovideo.ai/?utm_source=pypi-langchain&utm_medium=package
Project-URL: Image to video with sound, https://freeimagetovideo.ai/video/image-to-video-ai-with-sound
Project-URL: API keys, https://freeimagetovideo.ai/settings/apikeys
Project-URL: Pricing, https://freeimagetovideo.ai/pricing
Project-URL: Source, https://github.com/hanshs474/langchain-freeimagetovideo
Author-email: Free Image to Video <support@freeimagetovideo.ai>
License-Expression: MIT
License-File: LICENSE
Keywords: agent,ai-video,freeimagetovideo,image-to-video,langchain,minimax,text-to-video,tool,video-generation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Video
Requires-Python: >=3.9
Requires-Dist: freeimagetovideo>=0.1.0
Requires-Dist: langchain-core>=0.3
Description-Content-Type: text/markdown

# langchain-freeimagetovideo

Free image to video AI with no daily cap: start with no sign-up, keep going on a free account. Every video comes with sound and no watermark. This is the official LangChain integration for [Free Image to Video](https://freeimagetovideo.ai/?utm_source=pypi-langchain&utm_medium=package): it gives any LangChain agent a tool that turns a prompt, or a photo plus a prompt, into a video clip.

```bash
pip install langchain-freeimagetovideo
export FREEIMAGETOVIDEO_API_KEY=sk-...   # create one at https://freeimagetovideo.ai/settings/apikeys
```

```python
from langchain_freeimagetovideo import FreeImageToVideoGenerator

video = FreeImageToVideoGenerator()
video.invoke({"prompt": "a paper lantern drifting over a night river, slow push in"})
# -> "https://cdn.freeimagetovideo.ai/....mp4"

# image to video: the photo becomes the first frame
video.invoke({
    "prompt": "the camera slowly orbits the statue",
    "image_url": "https://example.com/statue.jpg",
    "duration": 6,
    "aspect_ratio": "9:16",
})
```

Hand it to any tool-calling agent:

```python
from langchain.agents import create_agent
from langchain_freeimagetovideo import FreeImageToVideoGenerator, FreeImageToVideoStatus

agent = create_agent("openai:gpt-5", tools=[FreeImageToVideoGenerator(), FreeImageToVideoStatus()])
agent.invoke({"messages": [("user", "Make a 6-second vertical clip of a fox trotting through fresh snow")]})
```

## Tools

| Tool | Input | Returns |
|---|---|---|
| `freeimagetovideo_video_generator` | `prompt`, optional `image_url`, `duration` (4/5/6/8/10/15), `resolution` (480p/768p), `aspect_ratio` (16:9/9:16/1:1) | URL of the MP4, with sound |
| `freeimagetovideo_check_status` | `task_id` | URL once ready, or where the run is |

The model is MiniMax H3. Video takes minutes: the generator waits up to `timeout` seconds (600 by default) and otherwise hands back the task id, so the agent can call the status tool later instead of blocking.

On the site the same model runs as [image to video AI with sound](https://freeimagetovideo.ai/video/image-to-video-ai-with-sound) and [free text to video AI](https://freeimagetovideo.ai/video/free-text-to-video-ai).

## API key and plans

Create a key at [freeimagetovideo.ai/settings/apikeys](https://freeimagetovideo.ai/settings/apikeys) and pass it as `api_key=` or set `FREEIMAGETOVIDEO_API_KEY`. API runs need a paid plan: each run draws on the plan's full-speed allowance, then waits in the relaxed queue. See [pricing](https://freeimagetovideo.ai/pricing).

Refusals come back to the agent as text rather than an exception: a missing or wrong key, no paid plan, not enough credits, too many runs at once, or a prompt the filter refused. The agent can reword or tell the user what to do instead of crashing the run.

Built on the [freeimagetovideo](https://pypi.org/project/freeimagetovideo/) Python SDK.

MIT licensed. Source: [github.com/hanshs474/langchain-freeimagetovideo](https://github.com/hanshs474/langchain-freeimagetovideo).
