chat_completion
Call a text model
Send a conversation to any text model available through CCAPI (Claude, GPT, Gemini, DeepSeek, GLM, MiniMax, Kimi, Qwen…) and get the reply. Useful for consulting a second model for a different perspective, running a cheap model over bulk work, or reaching a model the current client does not have configured. Responses are non-streaming.
Parametersstopmodelrequiredtop_pmessagesrequiredmax_tokenstemperature
Edit existing images according to an instruction, using the dedicated image edit endpoint. Provide at least one source image. For pure text-to-image, or for models that take references through the generation endpoint, use generate_image instead.
Parametersnsizeasyncmodelrequiredimagespromptrequiredqualityaspect_rationsfw_checkerwait_secondsresponse_format
extend_music
Extend a song
Continue an existing song from a given timestamp, producing a longer version. Requires the clip_id of a previously generated song, which appears in the 'raw' payload of a completed generate_music task. Asynchronous — poll with get_task.
Parameterstagstitlepromptclip_idrequiredprovidercontinue_atrequiredwait_seconds
generate_image
Generate an image
Generate an image from a text prompt, optionally guided by reference images (image-to-image). Returns image URLs directly. Most models finish in 10-60 seconds; if your client times out, set async=true to get a task_id you can poll instead. This call costs money — do not retry speculatively.
Parametersnsizeasyncmodelrequiredimagespromptrequiredqualityaspect_rationsfw_checkerwait_secondsresponse_format
generate_lyrics
Generate lyrics
Write song lyrics from a description, without generating audio. Useful as a first step before generate_music with custom=true, so the user can approve the words before paying for audio. Asynchronous — poll with get_task.
Parameterspromptrequiredproviderlyrics_modelwait_seconds
generate_music
Generate a song
Generate a song with vocals or instrumental. Two modes: simple (custom=false) where you describe the song and the model writes the lyrics, or custom (custom=true) where you supply lyrics, title and style tags. Asynchronous — returns a task_id you poll with get_task; generation usually takes 30-120 seconds and normally yields two variations.
Parameterstagsmodeltitlecustompromptrequiredproviderinstrumentalwait_secondsnegative_tags
generate_video
Generate a video
Generate a video from a text prompt, optionally driven by reference images (image-to-video, first/last frame). This is asynchronous: it returns a task_id you poll with get_task(platform='video'). Generation usually takes 30-180 seconds. Pass wait_seconds to have the server poll for you. Video generation is the most expensive capability here — confirm the prompt with the user before spending on retries.
Parametersmodelrequiredratioaudiosimagespromptrequiredvideosdurationresolutionimage_roleswait_secondsgenerate_audio
get_balance
Get account balance
Report the remaining and used balance for this CCAPI key. Useful before starting an expensive batch of generations, or to explain a quota failure to the user.
Takes no parameters.
get_task
Check an async task
Check the status of an asynchronous generation task submitted by generate_video, generate_music, generate_lyrics, extend_music, or generate_image with async=true. Pass the platform and task_id exactly as they were returned. Status is one of queued, in_progress, completed or failed; poll every few seconds until it settles, or pass wait_seconds to have the server wait for you.
Parameterstask_idrequiredplatformrequiredwait_seconds
list_models
List available models
List the AI models this CCAPI key can actually call, with their capability category and the MCP tool that drives them. Call this before generating anything if you are unsure a model name is valid — availability depends on the key's group and changes over time. Never guess model names.
Parameterssearchcategory
upscale_image
Upscale an image
Increase the resolution of an existing image 2x with ccapi-upscale-v1. Input must be between 256x256 and 1024x1024 and under 5 MB; for larger inputs, regenerate with a high-resolution model instead.
Parametersimagerequiredmodel_qualityresponse_format