Install
openclaw skills install digen-ai-freeDigenAI image and video generation for OpenClaw. Supports image-to-video and text-to-image. Video generation via api.cowork.digen.ai with Bearer token. Triggers on: generate image, generate video, Digen AI, text to image, image to video, text to video. API key available at https://claw.digen.ai or via Discord/Telegram.
openclaw skills install digen-ai-freeGenerate images from text prompts and videos from images via DigenAI API.
Video generation requires a free API key (starts with ak_).
Your API key is used as:
Authorization: Bearer YOUR_API_KEY
Note: The API uses https://api.cowork.digen.ai as the base URL.
from digen_ai_client import DigenAIClient
# Video generation — requires API Key (ak_xxx)
client = DigenAIClient(api_key="ak_xxxxxxxxxxxxxxxxxxxx")
Uses api.digen.ai with DIGEN_TOKEN + DIGEN_SESSION_ID
| Model | Description |
|---|---|
default | High quality model |
from digen_ai_client import DigenAIClient
client = DigenAIClient(
old_api_token="your_token",
old_api_session="your_session"
)
result = client.generate_image_sync(
prompt="futuristic cyberpunk city at night, neon lights, rainy streets, highly detailed, 8K",
model="default",
resolution="1:1"
)
if result["success"]:
print(f"✅ Image: {result['images'][0]}")
else:
print(f"❌ Error: {result.get('error')}")
Uses new API with Bearer API Key
model="turbo"The video generation API requires model="turbo" parameter (not default).
| Model | Description | Max Duration |
|---|---|---|
turbo | Fast and high quality generation | 10s |
image_url + promptfrom digen_ai_client import DigenAIClient
client = DigenAIClient(api_key="ak_xxxxxxxxxxxxxxxxxxxx")
result = client.generate_video_sync(
image_url="https://your-image.jpg",
prompt="gentle camera pan left, neon lights twinkling",
model="turbo", # IMPORTANT: use "turbo", not "default"
duration=5
)
if result["success"]:
print(f"✅ Video: {result['video_url']}")
print(f" Thumbnail: {result['thumbnail_url']}")
else:
print(f"❌ Error: {result.get('error')}")
client = DigenAIClient(api_key="ak_xxxxxxxxxxxxxxxxxxxx")
result = client.generate_video_sync(
prompt="A cute cat playing piano in a cozy room, soft lighting",
model="turbo",
duration=5
)
if result["success"]:
print(f"✅ Video: {result['video_url']}")
else:
print(f"❌ Error: {result.get('error')}")
# Note: Text-to-Video may fail if your API key only has image-to-video credits
client = DigenAIClient(api_key="ak_xxx")
info = client.get_api_key_info()
print(info)
# {'success': True, 'data': {'api_key': 'ak_xxx', 'status': 1, 'created_at': '...'}}
result = client.upload_image(file_path="/path/to/image.jpg")
if result["success"]:
print(f"Image URL: {result['url']}")
| Variable | Description |
|---|---|
DIGEN_TOKEN | Old API token for image generation |
DIGEN_SESSION_ID | Old API session ID for image generation |
DIGEN_API_KEY | New API key (ak_xxx) for video generation |
# Image generation (old API)
export DIGEN_TOKEN="your_token"
export DIGEN_SESSION_ID="your_session"
# Video generation (new API)
export DIGEN_API_KEY="ak_xxxxxxxxxxxxxxxxxxxx"
❌ API Key Not Found!
Get your free API key:
- Visit: https://claw.digen.ai
- Or join Discord: https://discord.gg/SRhbTt9hwp
| HTTP Code | Error Code | Description |
|---|---|---|
| 400 | invalid_request | Invalid or missing parameters |
| 401 | invalid_api_key | Invalid or missing API key |
| 402 | insufficient_credits | Not enough credits |
| 404 | not_found | Resource not found |
| 500 | internal_error | Internal server error |
| Method | Endpoint | Description |
|---|---|---|
GET | /b/v1/api-key | Get API key info |
POST | /b/v1/upload | Upload image file |
POST | /b/v1/video/generate | Generate video |
GET | /b/v1/video/{id} | Get video status |
Base URL: https://api.cowork.digen.ai
| Method | Endpoint | Description |
|---|---|---|
POST | /v2/tools/text_to_image | Generate image |
POST | /v6/video/get_task_v2 | Get image status |
Base URL: https://api.digen.ai
scripts/digen_ai_client.py - Python client with sync/async supportscripts/batch_generate.py - Batch image generation utilityassets/telegram-bot.py - Telegram bot for API key distributionassets/discord-bot.py - Discord bot for API key distributionmodel="turbo" (not default or seedance-2.0)image_url parameter