Phosor AI
Generate AI videos (text-to-video, image-to-video) with optional custom LoRA styles via the Phosor AI platform.
For detailed API endpoints, parameters, pricing, and limits, see references/api.md.
Setup
- 1. Sign up or log in at phosor.ai
- Go to Settings → API Keys to generate your API key
- Set it as an environment variable:
CODEBLOCK0
Keep your API key secret. Do not commit it to version control or share it publicly. All API calls are authenticated and billed through this key.
The CLI script is at scripts/phosor_client.py. All commands output JSON to stdout.
Local files used by the CLI:
- - Writes
phosor-pending.json to track pending job states locally
Quick Start
Text-to-Video
CODEBLOCK1
Image-to-Video
Two-step flow: upload image first, then submit with the returned S3 key.
CODEBLOCK2
With Custom LoRA
Upload your own LoRA model, then use it in video generation.
CODEBLOCK3
CLI Commands
Job Management
- -
submit <prompt> — Submit inference job (T2V/I2V). Options: --width, --height, --num-frames, --fps, --steps, --guidance, --image-url, --lora-id, --lora-scale, --seed, --negative-prompt, INLINECODE14 - INLINECODE15 — Get job status
- INLINECODE16 — Get job result (video URL)
- INLINECODE17 — Poll all pending jobs
- INLINECODE18 — List locally tracked pending jobs
- INLINECODE19 — Get job history. Options: INLINECODE20
File Upload
- -
upload-image <file> — Upload image for I2V - INLINECODE22 — Import image from URL. Options: INLINECODE23
- INLINECODE24 — Upload LoRA (two .safetensors). Options: INLINECODE25
- INLINECODE26 — Import LoRA from URLs. Options: INLINECODE27
LoRA Management
- -
loras — List LoRA models. Options: --limit, INLINECODE30 - INLINECODE31 — Get LoRA upload status
- INLINECODE32 — Delete a LoRA model
Utilities
- -
check-key — Validate API key - INLINECODE34 — List available models
- INLINECODE35 — Get quota usage/limits
Key Constraints
Resolutions (exact pairs only)
- - 480p landscape — 854 × 480, max 161 frames
- 480p portrait — 480 × 854, max 161 frames
- 720p landscape — 1280 × 720, max 161 frames
- 720p portrait — 720 × 1280, max 161 frames
- 1080p landscape — 1920 × 1080, max 153 frames
- 1080p portrait — 1080 × 1920, max 153 frames
Frame Alignment
Frames must follow 1 + 4*k where k >= 1 (e.g. 5, 9, 13, ... 81, 85, ...). Server auto-aligns down.
Inference Parameters
- -
frames_per_second — default: 16, range: 4–30 - INLINECODE39 — default: 4, range: 4
- INLINECODE40 — default: 1.0, range: 1.0–3.5
- INLINECODE41 — default: 1.0, range: 0.0–2.0
Two-Step Upload Rule
Files must be uploaded before use:
- 1. Image →
upload-image / import-image → returns s3_key → use as INLINECODE45 - LoRA →
upload-lora / import-lora → returns lora_id → use as INLINECODE49
Queue Flow
CODEBLOCK4
The poll command checks all locally-tracked pending jobs and removes completed/failed ones.
Pricing
- - 480p — $0.0002 per frame (0.002 credits)
- 720p — $0.0006 per frame (0.006 credits)
- 1080p — $0.0012 per frame (0.012 credits)
- LoRA multiplier — 1.25x
Exchange rate: 10 credits = $1 USD. Credits pre-deducted, auto-refunded on failure.
Version History
1.0.0 (2026-03-21)
- - Initial release
- Text-to-video and image-to-video generation (Wan 2.2 14B)
- Custom LoRA support (upload, import, use in inference)
- 16 CLI commands
- Model registry with
GET /api/v1/models endpoint - Supported models:
wan/2.2-14b/text-to-video, INLINECODE53
Phosor AI
通过Phosor AI平台生成AI视频(文本转视频、图像转视频),并可选择使用自定义LoRA风格。
详细的API端点、参数、定价和限制,请参见references/api.md。
设置
- 1. 在phosor.ai注册或登录
- 前往设置 → API密钥生成您的API密钥
- 将其设置为环境变量:
bash
export PHOSORAPIKEY=your-api-key-here
请妥善保管您的API密钥。 不要将其提交到版本控制系统或公开分享。所有API调用均通过此密钥进行身份验证和计费。
CLI脚本位于scripts/phosor_client.py。所有命令均以JSON格式输出到标准输出。
CLI使用的本地文件:
- - 写入phosor-pending.json以本地跟踪待处理作业状态
快速开始
文本转视频
bash
提交T2V作业(480p,81帧,16fps)
python3 scripts/phosor_client.py submit 一只猫在日落时分的海滩上行走 \
--width 854 --height 480 --num-frames 81 --fps 16
检查状态
python3 scripts/phosor
client.py status id>
获取结果(视频URL)
python3 scripts/phosorclient.py result id>
图像转视频
两步流程:先上传图像,然后使用返回的S3密钥提交。
bash
步骤1:上传图像
python3 scripts/phosor_client.py upload-image /path/to/photo.jpg
返回:{fileid: img-xxx, s3key: images/img-xxx.jpg, ...}
步骤2:使用s3key作为imageurl提交I2V作业
python3 scripts/phosor_client.py submit 照片中的人开始跳舞 \
--image-url images/img-xxx.jpg --width 854 --height 480
使用自定义LoRA
上传您自己的LoRA模型,然后在视频生成中使用。
bash
上传LoRA(两个.safetensors文件:highnoise + lownoise)
python3 scripts/phosorclient.py upload-lora highnoise.safetensors low_noise.safetensors --name 我的风格
检查上传状态
python3 scripts/phosorclient.py lora-status id>
在推理中使用
python3 scripts/phosorclient.py submit 一个人走路 --lora-id id> --lora-scale 1.0
或者从URL导入LoRA
python3 scripts/phosor_client.py import-lora \
https://example.com/high_noise.safetensors \
https://example.com/low_noise.safetensors \
--name 我的风格
CLI命令
作业管理
- - submit — 提交推理作业(T2V/I2V)。选项:--width、--height、--num-frames、--fps、--steps、--guidance、--image-url、--lora-id、--lora-scale、--seed、--negative-prompt、--model
- status id> — 获取作业状态
- result id> — 获取作业结果(视频URL)
- poll — 轮询所有待处理作业
- list — 列出本地跟踪的待处理作业
- history — 获取作业历史。选项:--limit
文件上传
- - upload-image — 上传图像用于I2V
- import-image — 从URL导入图像。选项:--filename
- upload-lora noise
file> noisefile> — 上传LoRA(两个.safetensors文件)。选项:--nameimport-lora noiseurl> noiseurl> — 从URL导入LoRA。选项:--name
LoRA管理
- - loras — 列出LoRA模型。选项:--limit、--offset
- lora-status id> — 获取LoRA上传状态
- delete-lora id> — 删除LoRA模型
工具
- - check-key — 验证API密钥
- models — 列出可用模型
- quotas — 获取配额使用情况/限制
关键约束
分辨率(仅限精确配对)
- - 480p横屏 — 854 × 480,最多161帧
- 480p竖屏 — 480 × 854,最多161帧
- 720p横屏 — 1280 × 720,最多161帧
- 720p竖屏 — 720 × 1280,最多161帧
- 1080p横屏 — 1920 × 1080,最多153帧
- 1080p竖屏 — 1080 × 1920,最多153帧
帧对齐
帧数必须遵循1 + 4*k,其中k >= 1(例如5、9、13...81、85...)。服务器会自动向下对齐。
推理参数
- - framespersecond — 默认值:16,范围:4–30
- numinferencesteps — 默认值:4,范围:4
- guidancescale — 默认值:1.0,范围:1.0–3.5
- lorascale — 默认值:1.0,范围:0.0–2.0
两步上传规则
文件必须在使用前上传:
- 1. 图像 → upload-image / import-image → 返回s3key → 用作--image-url
- LoRA → upload-lora / import-lora → 返回loraid → 用作--lora-id
队列流程
待处理 → 处理中 → 已完成 / 失败
poll命令检查所有本地跟踪的待处理作业,并移除已完成或失败的作业。
定价
- - 480p — 每帧$0.0002(0.002积分)
- 720p — 每帧$0.0006(0.006积分)
- 1080p — 每帧$0.0012(0.012积分)
- LoRA乘数 — 1.25倍
汇率:10积分 = 1美元。积分预先扣除,失败时自动退还。
版本历史
1.0.0(2026-03-21)
- - 初始版本
- 文本转视频和图像转视频生成(Wan 2.2 14B)
- 自定义LoRA支持(上传、导入、推理中使用)
- 16个CLI命令
- 模型注册表,包含GET /api/v1/models端点
- 支持的模型:wan/2.2-14b/text-to-video、wan/2.2-14b/image-to-video