Loading...
Loading...
Use when the user's intent is visual and the task can be solved with Fotor OpenAPI image or video generation, editing, transformation, enhancement, batch output, or account credit lookup, including product photos, marketing creatives, posters,banners, social covers, background changes, upscaling, restoration, and other image- or video-related asset workflows.
npx skill4agent add fotor-ai/fotor-skills fotor-skillsuvuv# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"uv python install 3.12
uv venv --python 3.12 .venv
./.venv/bin/python scripts/ensure_sdk.pyuv.venvFOTOR_OPENAPI_KEYreferences/configure-fotor-openapi-key.md.env./.venv/bin/python.venv\\Scripts\\python.exeuvscripts/ensure_sdk.pyfotor-sdkuv pip install --python <interpreter>--upgradescripts/run_task.pyecho '{"task_type":"text2image","params":{"prompt":"A cat","model_id":"seedream-4-5-251128"}}' \
| ./.venv/bin/python scripts/run_task.pyecho '[
{"task_type":"text2image","params":{"prompt":"A cat","model_id":"seedream-4-5-251128"},"tag":"cat"},
{"task_type":"text2video","params":{"prompt":"Sunset","model_id":"kling-v3","duration":5},"tag":"sunset"}
]' | ./.venv/bin/python scripts/run_task.py --concurrency 5--input FILE--concurrency N--poll-interval S--timeout Stask_idstatussuccessresult_urlerrorelapsed_secondscreditsIncrementtagtask_type + model_idrun_task.pyfallback_usedoriginal_model_idfallback_model_idscripts/upload_image.py./.venv/bin/python scripts/upload_image.py ./input.jpg --task-type image2image/v1/upload/signtypesuffixfile_urlupload_urlfile_urlimage_urlstart_image_urlend_image_urlimage_urlsimage2imageimg2imgimage_upscaleimg_upscalebackground_removebg_removesingle_image2videoimg2videostart_end_frame2videoimg2videomultiple_image2videoimg2videoscripts/check_skill_update.py./.venv/bin/python scripts/check_skill_update.py --mark-notified --check-interval-hours 24./.venv/bin/python scripts/check_skill_update.py --install-source skills-github --slug fotor-skills --current-version 1.0.0 --github-source fotor-ai/fotor-skills --mark-notified --check-interval-hours 24clawhubskills-githubclawhub_meta.jsonclawhub inspect <slug> --jsonskills-githubSKILL.mdmetadata.versionSKILL.mdCHANGELOG.mdinstall_sourcecurrent_versionlatest_versionupdate_availableshould_notify--mark-notified--check-interval-hourschangelog_preview--install-source--slug--current-version--github-sourcereferences/image_models.mdreferences/video_models.mdreferences/parameter_reference.mdreferences/image_scenarios.mdreferences/video_scenarios.mdreferences/install-or-upgrade.mdfotor-skillsnpx skillsreferences/configure-fotor-openapi-key.mdFOTOR_OPENAPI_KEYuvuvuv python install 3.12.venvuv venv --python 3.12 .venv./.venv/bin/python scripts/ensure_sdk.pyfotor-sdkuv.venvensure_sdk.py./.venv/bin/python scripts/check_skill_update.py --mark-notified --check-interval-hours 24should_notify: truereferences/install-or-upgrade.mdFOTOR_OPENAPI_KEY./.venv/bin/python scripts/upload_image.py <local-file> --task-type <task-type>file_urlmodel_idimage_scenarios.mdvideo_scenarios.md./.venv/bin/python scripts/run_task.py.venvresult_urlimage_upscalerun_task.pytext2imagegemini-3.1-flash-image-previewseedream-5-0-260128image2imagegemini-3.1-flash-image-previewseedream-5-0-260128text2videodoubao-seedance-1-5-prokling-v3single_image2videodoubao-seedance-1-5-prokling-v3start_end_frame2videokling-video-o1viduq2-turbomultiple_image2videokling-v3-omnikling-video-o1| task_type | Function | Required Params |
|---|---|---|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
on_poll**extrareferences/parameter_reference.mdrun_task.pyimport os
from fotor_sdk import FotorClient
client = FotorClient(
api_key=os.environ["FOTOR_OPENAPI_KEY"],
endpoint=os.environ.get("FOTOR_OPENAPI_ENDPOINT", "https://api.fotor.com"),
)
credits = client.get_credits_sync()
print("credits:", credits){"businessId": "", "total": 2000, "remaining": 1973}scripts/run_task.pyimport os
from fotor_sdk import FotorClient
client = FotorClient(api_key=os.environ["FOTOR_OPENAPI_KEY"])from fotor_sdk import text2image
result = await text2image(client, prompt="A diamond kitten", model_id="seedream-4-5-251128")
print(result.result_url)from fotor_sdk import TaskRunner, TaskSpec
runner = TaskRunner(client, max_concurrent=5)
specs = [
TaskSpec("text2image", {"prompt": "A cat", "model_id": "seedream-4-5-251128"}, tag="cat"),
TaskSpec("text2video", {"prompt": "Sunset", "model_id": "kling-v3", "duration": 5}, tag="sunset"),
]
results = await runner.run(specs)from fotor_sdk import text2video
result = await text2video(client, prompt="Jazz band", model_id="kling-v3",
audio_enable=True, audio_prompt="Smooth jazz")result.success # bool: True when COMPLETED with result_url
result.result_url # str | None
result.status # TaskStatus: COMPLETED / FAILED / TIMEOUT / IN_PROGRESS / CANCELLED
result.error # str | None (e.g. "NSFW_CONTENT")
result.elapsed_seconds # float
result.creditsIncrement # int | float: credits consumed by this task
result.metadata # dict (includes "tag" from TaskRunner)FotorAPIError.coderesult.successerror="NSFW_CONTENT"logging.getLogger("fotor_sdk").setLevel(logging.DEBUG)