This skill provides Image-to-Image transformation capabilities through the Media.io OpenAPI. Transform your existing images into new creations using state-of-the-art AI models for style transfers, artistic filters, and creative transformations.
Use this skill when you hear:
The Image-to-Image API supports multiple models:
i2i-seedream-v4-0) - High aesthetic quality, 4K support, character consistencyi2i-banana-2) - Advanced reasoning, multi-image fusioni2i-banana) - Fast and efficient generationi2i-media-2.0) - Proprietary native modelVariableRequiredDescriptionAPI_KEYYesMedia.io OpenAPI key, sent as X-API-KEY header. Apply at https://developer.media.io/.
Seedream 4.0i2i-seedream-v4-0POST https://openapi.media.io/generation/seedream/i2i-seedream-v4-0ParameterTypeRequiredDescriptionpromptstringYesText description for transformationimagestringYesReference image URL for transformationratiostringNoImage aspect ratiostrengthstringNoHow strongly to follow the reference image (0.0-1.0)
json
{
"code": 0,
"msg": "",
"data": {
"task_id": "..."
},
"trace_id": "..."
}
bash
pip install requests
python
import os
from scripts.skill_router import Skill
skill = Skill('scripts/c_api_doc_detail.json')
api_key = os.getenv('API_KEY', '')
if not api_key:
raise RuntimeError('API_KEY is not set')
Windows PowerShell:
powershell
$env:API_KEY="your-api-key"
macOS / Linux (bash/zsh):
bash
export API_KEY="your-api-key"
python
import os
from scripts.skill_router import Skill
skill = Skill('scripts/c_api_doc_detail.json')
api_key = os.getenv('API_KEY', '')
if not api_key:
raise RuntimeError('API_KEY is not set')
result = skill.invoke(
'Seedream 4.0',
{
'prompt': 'transform this photo into an oil painting in the style of Van Gogh, vibrant colors, visible brushstrokes',
'image': 'https://example.com/input-image.jpg'
},
api_key=api_key
)
print(result) # Returns task_id when code=0
python
import os
from scripts.skill_router import Skill
skill = Skill('scripts/c_api_doc_detail.json')
api_key = os.getenv('API_KEY', '')
if not api_key:
raise RuntimeError('API_KEY is not set')
result = skill.invoke(
'Nano Banana Pro',
{
'prompt': 'enhance this portrait with dramatic cinematic lighting, professional photography quality, shallow depth of field',
'image': 'https://example.com/portrait.jpg'
},
api_key=api_key
)
print(result)
python
import os
from scripts.skill_router import Skill
skill = Skill('scripts/c_api_doc_detail.json')
api_key = os.getenv('API_KEY', '')
if not api_key:
raise RuntimeError('API_KEY is not set')
result = skill.invoke(
'Seedream 4.0',
{
'prompt': 'convert this landscape into a cyberpunk cityscape at night, neon lights, rain reflections, futuristic atmosphere',
'image': 'https://example.com/landscape.jpg',
'ratio': '16:9'
},
api_key=api_key
)
print(result)
python
import os
from scripts.skill_router import Skill
skill = Skill('scripts/c_api_doc_detail.json')
api_key = os.getenv('API_KEY', '')
if not api_key:
raise RuntimeError('API_KEY is not set')
result = skill.invoke(
'Nano Banana',
{
'prompt': 'reimagine this image as a watercolor painting, soft edges, pastel colors, artistic interpretation',
'image': 'https://example.com/original.jpg',
'strength': '0.7'
},
api_key=api_key
)
print(result)
python
import os
import time
from scripts.skill_router import Skill
skill = Skill('scripts/c_api_doc_detail.json')
api_key = os.getenv('API_KEY', '')
if not api_key:
raise RuntimeError('API_KEY is not set')
task_id = 'your-task-id'
for _ in range(24):
r = skill.invoke('Task Result', {'task_id': task_id}, api_key=api_key)
print(r)
status = (r.get('data') or {}).get('status')
if status in ('completed', 'failed', 'succeeded'):
break
time.sleep(5)
waiting: queuedprocessing: runningcompleted: completed successfullyfailed: failedtimeout: timed outModelBest ForResolutionSpeedSeedream 4.0High quality, artisticUp to 4KMediumNano Banana ProAdvanced reasoning, fusionUp to 4KMediumNano BananaFast transformationsUp to 4KFastMedia 2.0Diverse stylesStandardFast
Error CodeDescription374004Not authenticated. Apply for an APP KEY at https://developer.media.io/490505Insufficient credits. Recharge before invoking generation APIs