Enum Catalog
Fetch, in one call, the complete set of enum values accepted by Gitruck Cloud APIs: voices, subtitle styles and colours, language codes, project file formats, matting modes, rhythm presets, and more.
This catalog is the machine-readable source of truth. The enum values printed in individual API pages are snapshots of it — where the two disagree, what this endpoint returns wins.
Basics
| Item | Value |
|---|---|
| Method | GET |
| Path | /catalog |
| Authentication | None required |
| Caching | Cache-Control: public, max-age=60 + ETag |
No request parameters.
Why it exists
Enum values change as the service evolves — a new subtitle style, a new voice, a task type temporarily taken offline. Until now, callers had no choice but to copy those values into their own code, and then one day the server changed while the copy did not:
- a newly accepted value gets rejected by the caller's own local validation;
- a value that was taken offline keeps being sent.
Neither raises an error. The behaviour is simply wrong. Fetching this catalog removes the need to copy anything.
Two version fields, two different meanings
| Field | Changes when | How to use it |
|---|---|---|
schema | The structure changes (how fields are laid out); bumped by hand. Adding a new section or field does not bump it | Check this first. If it changed, your parsing code may need updating |
catalog_version | The content changes (the enum values themselves); derived automatically from the content | Compare against your local snapshot; refresh the snapshot when it differs |
The HTTP ETag carries the same value as catalog_version. Send If-None-Match and you get 304 with an empty body when nothing has changed.
Response example
{
"code": 200,
"msg": "success",
"data": {
"schema": 1,
"catalog_version": "c9843194d63429ac31012be87ae0be3b",
"sections": {
"tts": {
"voices": [
{ "id": "ali_longlaobo_v3", "internal_only": false, "maturity": "stable" }
],
"output_formats": ["wav", "mp3"],
"split_methods": ["cut0", "cut1", "cut2", "cut3", "cut4", "cut5"],
"subtitle_formats": ["srt"]
},
"music_visualizer": {
"templates": ["aurora", "bars", "lissajous", "nowplaying", "pulsar", "ridge", "ring", "shockwave", "vinyl"]
},
"subtitle": {
"languages": { "中文": "zh-CN", "英文": "en-US", "日文": "ja-JP" },
"source_languages": {
"video_oral_cut": ["en-US", "fr-FR", "ja-JP", "ko-KR", "zh-CHS", "zh-CHT", "zh-CN"]
},
"styles": ["default", "outline", "cinema_yellow", "immersive_box", "wide_spacing", "deep_shadow", "boxed"],
"colors": ["雅黑", "淡绿", "森林绿", "湖蓝", "道奇蓝", "钢蓝", "浅粉红", "深橙", "珊瑚橙", "橙红", "土豪金"]
},
"asr": { "languages": ["zh-CN", "en-US", "ja-JP"] },
"task_availability": { "offline": [] },
"matting": {
"video": { "target_modes": ["auto", "mask"], "output_formats": ["webm"] },
"image": { "output_formats": ["png", "webp"] }
},
"audio_separation": { "modes": ["fast", "turbo"] },
"oral_cut": { "rhythm_presets": ["compact", "concise", "steady"] },
"project_formats": {
"public": ["xml", "fcpxml", "otio", "jianying", "capcut", "gtrk"],
"aliases": ["xml", "fcpxml", "otio", "jianying_draft", "jianying_meta", "capcut_draft", "capcut_meta", "gtrk"]
},
"video_ai_segment": { "modes": ["narrative", "scene", "shot_type", "subject"] },
"video_interpolate": { "multipliers": [2, 3, 4] }
}
}
}
The example lists only part of
voices,languages,source_languagesandasr.languages; the real response returns all of them.
Sections
| Section | Used by |
|---|---|
tts | Voice cloning: voices, output formats, text split methods, subtitle formats |
music_visualizer | Music visualiser templates |
subtitle | Subtitle languages: languages is the shared range (use it for translation target languages); source_languages lists, per task type, the recognition source languages accepted; plus styles and colours |
asr | Recognition languages accepted by speech recognition (/asr) |
task_availability | offline lists task types temporarily withdrawn; an empty array means none are |
matting | Video / image matting modes and output formats |
audio_separation | Vocal separation modes |
oral_cut | Rhythm presets for talking-head cutting |
project_formats | Project file formats. public is the public enum; aliases are older fine-grained values still accepted |
video_ai_segment | Semantic segmentation modes |
video_interpolate | Frame-interpolation multipliers |
About task_availability
Task types listed under offline are still registered (type and pricing unchanged); they merely refuse new submissions and return error code 6029. Once restored, they disappear from this array.
The full list of registered task types is not served here — that list lives in the console and is maintained by operations. This endpoint only answers "which ones are temporarily unavailable".
About internal_only
Voices marked internal_only: true are listed as usual but are only usable by internal accounts. Being listed does not mean being available to you.
Suggested usage
- On first call, persist the whole
dataobject as a local snapshot and remembercatalog_version. - Afterwards send
If-None-Match: <previous ETag>; on304, keep using the local snapshot. - If the fetch fails, fall back to the last successful snapshot — do not fail your own flow because of it.
- With no snapshot at all, skip local validation and submit directly — the server-side whitelist is always the final authority.
Error codes
This endpoint is read-only and takes no parameters; under normal conditions it returns only 200 or 304.