The CometAPI connector lets your AI agent act in each user's CometAPI account. Each user connects their own CometAPI access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 37 tools.
- Tools
- 37
- What they doRead · write · destructive
- 15 · 22 · 015 read22 write0 destructive
- Users sign in with
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the CometAPI connection
In AgentKit > Connections, create a CometAPI connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'cometapi'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize CometAPI:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'cometapi_api_key_usage_get',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "cometapi"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize CometAPI:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="cometapi_api_key_usage_get",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their CometAPI credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolcometapi_api_key_usage_getGet the quota, usage, expiration and model limits of the connected CometAPI API key.Read-onlyGet API Key Usage
Get the quota, usage, expiration and model limits of the connected CometAPI API key. Returns the key's name, total and used quota, remaining quota, expiry and allowed models. Use this to check the remaining balance before large jobs.
Inputs
This tool takes no inputs.
cometapi_flux_result_getGet the status and result of a FLUX image task.Read-onlyGet FLUX Result
Get the status and result of a FLUX image task. Returns id, status and, when Ready, result.sample with the image URL. Use this after cometapi_flux_image_generate.
Inputs
idstringrequired- Task ID returned by cometapi_flux_image_generate. Example: 6f2c1a7e-8b3d-4e5f-9a0b-1c2d3e4f5a6b.
cometapi_grok_video_getGet the status and result of a Grok video task.Read-onlyGet Grok Video Task
Get the status and result of a Grok video task. Returns the status and, when done, the video URL and details. Use this after cometapi_grok_video_generate.
Inputs
request_idstringrequired- Request ID returned by cometapi_grok_video_generate. Example: d2f1e3a4-5b6c-7d8e-9f01-23456789abcd.
cometapi_hunyuan3d_job_getGet the status and result files of a Hunyuan 3D job.Read-onlyGet Hunyuan 3D Job
Get the status and result files of a Hunyuan 3D job. Returns the job status and, when done, the generated 3D files. Use this after cometapi_hunyuan3d_job_create.
Inputs
job_idstringrequired- Job ID returned by cometapi_hunyuan3d_job_create. Example: 1234567890123456789.
cometapi_image_task_getGet the status and result of an asynchronous image generation task.Read-onlyGet Image Generation Task
Get the status and result of an asynchronous image generation task. Returns the task status and, when finished, the image data. Use this after cometapi_image_generate with async true.
Inputs
task_idstringrequired- Task ID from data.task_id of the async image request. Example: task_01JABCDEF.
cometapi_kling_task_getGet the status and result of a Kling image, video or audio task.Read-onlyGet Kling Task
Get the status and result of a Kling image, video or audio task. Returns code and data with task_id, task_status and, when succeed, task_result with the video or image URLs. Use this after a Kling create tool, with the same resource and sub-action the task was created with.
Inputs
resourcestringrequired- Resource type of the task: images, videos or audio. Example: videos.one of
imagesvideosaudio sub_actionstringrequired- Sub-action the task was created with, such as text2video or image2video for videos, or generations for images. Example: text2video.
task_idstringrequired- Kling task ID from data.task_id. Example: CjhVQGbpLk0AAAAAAAAAA.
cometapi_midjourney_task_getGet the status and result of one Midjourney task.Read-onlyGet Midjourney Task
Get the status and result of one Midjourney task. Returns the task with status, progress, imageUrl, prompt and buttons (the customIds for follow-up actions). Use this to poll a task. Use cometapi_midjourney_tasks_list for several tasks at once.
Inputs
idstringrequired- Midjourney task ID returned in result by a submit tool. Example: 1712345678901234.
cometapi_midjourney_tasks_listGet the status and results of several Midjourney tasks at once.Read-onlyList Midjourney Tasks by ID
Get the status and results of several Midjourney tasks at once. Returns one task object per ID, with status, progress, imageUrl and buttons. Use this to poll many tasks. Use cometapi_midjourney_task_get for one task.
Inputs
idsarrayrequired- Array of Midjourney task ids to retrieve. Returns the current status and result for each. Defaults to ["example"]. Example: ["1712345678901234", "1712345678905678"]
cometapi_minimax_video_getGet the status of a MiniMax video generation task.Read-onlyGet MiniMax Video Task
Get the status of a MiniMax video generation task. Returns task_id, status and, when Success, file_id for the video. Use this after cometapi_minimax_video_create.
Inputs
task_idstringrequired- Task ID returned by cometapi_minimax_video_create. Example: 106916112212032.
cometapi_models_listList the models available through CometAPI.Read-onlyList Models
List the models available through CometAPI. Returns the model catalog with each model's ID, provider and type. Use this to pick a model ID for the generation tools.
Inputs
This tool takes no inputs.
cometapi_replicate_prediction_getGet the status and output of a Replicate prediction.Read-onlyGet Replicate Prediction
Get the status and output of a Replicate prediction. Returns id, status, output and any error. Use this after cometapi_replicate_prediction_create.
Inputs
idstringrequired- Prediction ID returned by cometapi_replicate_prediction_create. Example: q7r8s9t0abcd.
cometapi_runway_task_getGet the status and output of a Runway task.Read-onlyGet Runway Task
Get the status and output of a Runway task. Returns id, status, progress and, when SUCCEEDED, output (the result URLs). Use this after a Runway create tool.
Inputs
idstringrequired- Task ID returned by a Runway create tool. Example: 17f20503-6c24-4c16-946b-35dbbce2af2f.
cometapi_suno_task_getGet the status and result of one Suno music or lyrics task.Read-onlyGet Suno Task
Get the status and result of one Suno music or lyrics task. Returns the task with status, progress and data (clips with audio_url, image_url, title and duration, or the lyrics). Use this to poll a task. Use cometapi_suno_tasks_list for several tasks.
Inputs
task_idstringrequired- Task ID from a Suno submit tool. Example: 736a6f88-bd29-4b1e-b110-37132a5325ac.
cometapi_suno_tasks_listGet the status and results of several Suno tasks at once.Read-onlyList Suno Tasks by ID
Get the status and results of several Suno tasks at once. Returns one task object per ID with status and data. Use this to poll many tasks. Use cometapi_suno_task_get for one task.
Inputs
actionstringrequired- Task type: MUSIC or LYRICS. Defaults to MUSIC. Example: MUSIC.
idsarrayrequired- Suno task IDs to look up. Defaults to ["example"]. Example: ["736a6f88-bd29-4b1e-b110-37132a5325ac"]
cometapi_video_job_getGet the status of a video job created through CometAPI's /v1/videos API (Sora 2, Veo 3, Vidu, Wan, Seedance and others).Read-onlyGet Video Job
Get the status of a video job created through CometAPI's /v1/videos API (Sora 2, Veo 3, Vidu, Wan, Seedance and others). Returns id, model, status, progress and, when completed, the video details. Use this to poll a video job or a cometapi_sora_video_remix job.
Inputs
video_idstringrequired- Video job ID returned when the job was created. Example: video_68e688d4950481918ec389280c2f78140fcb904657674466.
cometapi_chat_completion_createGenerate a chat reply with any model CometAPI routes to (GPT, Claude, Gemini, Grok, DeepSeek, Qwen, Llama and others) through the OpenAI-compatible Chat Completions API.WriteCreate Chat Completion
Generate a chat reply with any model CometAPI routes to (GPT, Claude, Gemini, Grok, DeepSeek, Qwen, Llama and others) through the OpenAI-compatible Chat Completions API. Returns id, model, choices (each with message content and any tool_calls, and finish_reason) and usage token counts. Use this for most text generation. Use cometapi_response_create for the OpenAI Responses API, cometapi_message_create for the Anthropic Messages format, or cometapi_gemini_content_generate for the Gemini format.
Inputs
messagesarrayrequired- Conversation messages, each with a role (system, developer, user, assistant or tool) and content. Defaults to [{"role": "developer", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello!"}]. Example: [{"role": "user", "content": "Summarize the plot of Hamlet in two sentences."}]
modelstringrequired- Model ID to use, such as gpt-4o-mini, claude-sonnet-4-5 or gemini-2.5-flash. Get model IDs from cometapi_models_list. Defaults to gpt-6-astra. Example: gpt-4o-mini.
frequency_penaltynumber- Number between -2.0 and 2.0. Positive values penalize tokens proportionally to how often they have appeared, reducing verbatim repetition. Example: 0.
logprobsboolean- Return token log probabilities. Use gpt-4.1 as shown in the Logprobs example. Example: false.
max_completion_tokensinteger- Maximum generated tokens, including visible output and reasoning. Leave enough room for both, as in the image-input example. Example: 1024.
max_tokensinteger- Legacy output-token limit. Use max_completion_tokens for the GPT-6 Astra examples. Example: 512.
ninteger- Number of completion choices to generate for each input message. Defaults to 1. Example: 1.
presence_penaltynumber- Number between -2.0 and 2.0. Positive values penalize tokens based on whether they have already appeared, encouraging the model to explore new topics. Example: 0.
reasoning_effortstring- Reasoning effort supported by the selected model. The GPT-6 Astra examples use low; the GPT-5.6 Sol function example uses none. See the model reference for other supported levels. Example: low.
response_formatobject- Specifies the output format. Use {"type": "json_object"} for JSON mode, or {"type": "json_schema", "json_schema": {...}} for strict structured output. Example: {"type": "json_object"}
service_tierstring- Specifies the processing tier. Example: auto.one of
autodefaultflexpriority stoparray- A stop string, or a list of up to four strings, where generation stops. Example: END.
temperaturenumber- Sampling temperature. Omit this field for GPT-6 Astra. Example: 0.7.
tool_choicestring- Controls how the model selects tools. auto (default): model decides. none: no tools. required: must call a tool. Example: auto.
toolsarray- Function definitions for a model that supports tool calling on Chat Completions. The function example uses GPT-5.6 Sol; use Responses for GPT-6 Astra tool calls. Example: [{"type": "function", "function": {"name": "get_weather", "parameters": {"type": "object", "properties": {"city": {"type": "string"}}}}}]
top_logprobsinteger- Number of most likely tokens to return at each position (0-20). Requires logprobs to be true. Example: 5.
top_pnumber- Nucleus sampling threshold. Omit this field for GPT-6 Astra. For sampling overrides, adjust either top_p or temperature. Example: 1.
userstring- A unique identifier for your end-user. Helps with abuse detection and monitoring. Example: user-1234.
cometapi_embeddings_createCreate vector embeddings for text with an embedding model through CometAPI.WriteCreate Embeddings
Create vector embeddings for text with an embedding model through CometAPI. Returns data (one embedding per input, with index and the vector), model and usage. Use this for semantic search, clustering and retrieval.
Inputs
inputarrayrequired- The text to embed. Can be a single string, an array of strings, or an array of token arrays. Each input must not exceed the model's maximum token limit (8,191 tokens for text-embedding-3-* models). Example: The quick brown fox jumps over the lazy dog.
modelstringrequired- Embedding model ID, such as text-embedding-3-small. Get model IDs from cometapi_models_list. Example: text-embedding-3-small.
dimensionsinteger- The number of dimensions for the output embedding vector. Only supported by text-embedding-3-* models. Reducing dimensions can lower storage costs while maintaining most of the embedding's utility. Example: 512.
encoding_formatstring- The format of the returned embedding vectors. float returns an array of floating-point numbers. base64 returns a base64-encoded string representation, which can reduce response size for large batches. Defaults to float. Example: float.one of
floatbase64 userstring- A unique identifier for your end-user, which can help monitor and detect abuse. Example: user-1234.
cometapi_flux_image_generateGenerate or edit an image with a Black Forest Labs FLUX model through CometAPI.WriteGenerate FLUX Image
Generate or edit an image with a Black Forest Labs FLUX model through CometAPI. Returns a task id (and polling_url) when async, or the finished result with result.sample (the image URL) when async is false. Use this for FLUX models. Poll cometapi_flux_result_get with the id.
Inputs
modelstringrequired- FLUX model ID, such as flux-2-pro or flux-2-flex. Example: flux-2-pro.
promptstringrequired- Text prompt describing the image or reference-image edit. Example: A red fox in a snowy forest, cinematic lighting.
async_modeboolean- Controls whether generation returns asynchronously. Set false to wait for the finished image and read result.sample from the successful response. Set true or omit this field to receive a task ID for polling. Use a JSON boolean, not a string. Do not combine false with webhook_url or webhook_secret. Defaults to true. Example: true.
heightinteger- Requested output height in pixels. Use a dimension supported by the selected model. Example: 1024.
input_imagestring- Public HTTPS URL of the first reference image. Replace the example URL with a publicly accessible image. This editing field is available for the FLUX.2 models covered by this reference. Example: https://example.com/reference.png.
input_image_2string- Public HTTPS URL of a second reference image for flux-2-pro. Replace the example URL and also send input_image. Example: https://example.com/reference-2.png.
output_formatstring- Requested output image format supported by the selected model. The examples use png. Example: png.
seedinteger- Optional seed value. A completed result can report the used seed; that field alone does not establish repeatable output. Example: 42.
widthinteger- Requested output width in pixels. Use a dimension supported by the selected model. Example: 1024.
cometapi_gemini_content_generateGenerate content in the Google Gemini format through CometAPI, for Gemini models (text, and images with image-capable Gemini models).WriteGenerate Gemini Content
Generate content in the Google Gemini format through CometAPI, for Gemini models (text, and images with image-capable Gemini models). Returns candidates (each with content parts and finishReason) and usageMetadata. Use this when your requests use the Gemini format. Use cometapi_chat_completion_create for the OpenAI format.
Inputs
contentsarrayrequired- Conversation content. Each entry has an optional role (user or model) and a parts array. For tool results, preserve the complete preceding model content, including any thoughtSignature fields. Example: [{"role": "user", "parts": [{"text": "Explain how a rainbow forms."}]}]
modelstringrequired- Gemini model ID, such as gemini-2.5-flash. Get model IDs from cometapi_models_list. Example: gemini-2.5-flash.
generation_configobject- Configuration for model generation behavior including temperature, output length, and response format. Example: {"temperature": 0.7, "maxOutputTokens": 1024}
safety_settingsarray- Safety filter settings. Override default thresholds for specific harm categories. Example: [{"category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_ONLY_HIGH"}]
system_instructionobject- System instructions that guide the model's behavior across the entire conversation. Text only. Example: {"parts": [{"text": "Answer in one paragraph."}]}
tool_configobject- Configuration for tool usage, such as function calling mode. Example: {"functionCallingConfig": {"mode": "AUTO"}}
toolsarray- Tools available to the model during generation. Use googleSearch for search grounding. Example: [{"googleSearch": {}}]
cometapi_grok_video_generateStart an xAI Grok Imagine video generation task from text, an image or reference images and audio.WriteCreate Grok Video Task
Start an xAI Grok Imagine video generation task from text, an image or reference images and audio. Returns request_id. Use this for Grok video. Poll cometapi_grok_video_get with the request_id.
Inputs
modelstringrequired- The Grok video model ID. Send this field explicitly so the request uses Grok Imagine Video 1.5. Example: grok-imagine-video-1.5.one of
grok-imagine-video-1.5 promptstringrequired- A description of the scene, motion, and audio. Reference-to-video prompts can identify inputs with tags such as <IMAGE_0> and <AUDIO_0>. Example: A hummingbird hovering over a red flower, slow motion.
aspect_ratiostring- The output aspect ratio. Text-to-video uses 16:9 when omitted. Image-to-video uses the source image's aspect ratio when omitted. Example: 16:9.one of
1:116:99:164:33:43:22:3 durationinteger- The output duration in seconds. Use an integer from 1 through 15. Defaults to 8. Example: 8.
imageobject- Source image for image-to-video, as an object with a url (a public image URL or image data URI). Do not combine with reference_images. Example: {"url": "https://example.com/start.jpg"}
reference_imagesarray- Visual references for reference-to-video, 1 to 7 objects each with a url (a public image URL or image data URI). Do not combine with image. Example: [{"url": "https://example.com/ref.jpg"}]
resolutionstring- The output resolution. Reference-to-video requests support 480p and 720p; text-to-video and image-to-video also support 1080p. Defaults to 480p. Example: 480p.one of
480p720p1080p
cometapi_hunyuan3d_job_createStart a Tencent Hunyuan 3D job that turns an image into a 3D model.WriteCreate Hunyuan 3D Job
Start a Tencent Hunyuan 3D job that turns an image into a 3D model. Returns the job ID. Use this to create a 3D mesh from an image. Poll cometapi_hunyuan3d_job_get with the job ID.
Inputs
actionstringrequired- Tencent HY 3D Global operation name. Must be SubmitHunyuanTo3DProJob. Example: SubmitHunyuanTo3DProJob.
image_base64stringrequired- Base64-encoded primary image without a data URL prefix. Supported formats are JPG, JPEG, PNG, and WebP. Each side must be from 128 through 5,000 pixels. The encoded value must be at most 8 MB; keep the source file at or below 6 MB to allow for encoding overhead. Example: iVBORw0KGgoAAAANSUhEUgAA...
modelstringrequired- Tencent HY 3D Global model version. Must be 3.1. Example: 3.1.
enable_pbrboolean- Whether to add physically based rendering (PBR) material maps to the OBJ and MTL resource bundle for a Normal job. Defaults to false. Example: false.
face_countinteger- Target face count for the generated mesh. Treat this value as a target rather than an exact polygon guarantee. Defaults to 500000. Example: 100000.
generate_typestring- Generation mode. Choose Normal for textured output or Geometry for geometry-only output. Defaults to Normal. Example: Normal.one of
NormalGeometry
cometapi_image_generateGenerate images from a text prompt with OpenAI-compatible image models (GPT Image, DALL-E, Seedream and others) through CometAPI.WriteGenerate Image
Generate images from a text prompt with OpenAI-compatible image models (GPT Image, DALL-E, Seedream and others) through CometAPI. Returns created and data (image URLs or base64 images), or data.task_id when async is true. Use this for text-to-image. With async true, poll cometapi_image_task_get with the task_id.
Inputs
modelstringrequired- Image model ID, such as gpt-image-1, dall-e-3 or doubao-seedream-4-0-250828. Get model IDs from cometapi_models_list. Defaults to gpt-image-2. Example: gpt-image-1.
promptstringrequired- Text description of the image you want to generate. Example: A watercolor painting of a lighthouse at dawn.
async_modeboolean- CometAPI asynchronous task mode. Set this to true to return immediately with data.task_id, then poll GET /v1/images/generations/{task_id} for the final image data. Documented model IDs for this mode: gpt-image-2 and doubao-seedream-4-0-250828. This is a CometAPI extension, not an OpenAI parameter. When async and stream are both true, async takes precedence and returns JSON task metadata instead of an SSE stream. Defaults to false. Example: false.
backgroundstring- Background mode for the generated image. Set transparent to generate an isolated subject with no background fill; this requires output_format set to png or webp, and returns an error with jpeg. Set opaque for a solid background, or auto to let the model decide. Supported on gpt-image-2.5-sunburst and gpt-image-2.5-flare. Example: transparent.one of
transparentopaqueauto moderationstring- Content moderation level for GPT image models. low is less restrictive; auto is the default. Example: low.one of
lowauto ninteger- Number of images to generate. Keep this at 1 for the broadest compatibility. Defaults to 1. Example: 1.
output_compressioninteger- Compression level for the output image, from 0 to 100. Applies when output_format is webp or jpeg. Lower values produce smaller files with more compression artifacts. Defaults to 100. Example: 100.
output_formatstring- The encoded image type for GPT image model results, such as png, jpeg, or webp. See the OpenAI image generation guide for current GPT image output controls. Example: png.
qualitystring- Quality setting for models that support it. GPT image models accept low, medium, high, and auto. gpt-image-2.5-sunburst and gpt-image-2.5-flare also accept xhigh and max. dall-e-3 accepts standard and hd. See the OpenAI image generation guide for the latest model-specific values. Example: high.
response_formatstring- The response container for dall-e-2 and dall-e-3. This parameter is not supported for GPT image models, which return base64-encoded image data. Example: url.one of
urlb64_json sizestring- Requested output size. Supported values depend on the selected model. See the OpenAI image generation guide for the latest model-specific ranges. Example: 1024x1024.
cometapi_kling_image_to_videoStart a Kling video generation task that animates an image.WriteCreate Kling Image-to-Video Task
Start a Kling video generation task that animates an image. Returns code, message and data with task_id and task_status. Use this to animate a still image. Poll cometapi_kling_task_get with resource videos, sub-action image2video and the task_id.
Inputs
imagestringrequired- Source image URL or base64 image string. Use an image that meets Kling pixel requirements; very small thumbnails are rejected. For base64 input, send the encoded image string as the field value. Example: https://example.com/portrait.jpg.
callback_urlstring- Webhook URL to receive task status updates when the task completes. Example: https://example.com/callback.
cfg_scalenumber- Prompt adherence strength. Higher values follow the prompt more closely. Range: 0–1. Example: 0.5.
durationstring- Output video length in seconds. Use 5 or 10; omit to use 5. Defaults to 5. Example: 5.
external_task_idstring- Custom task id for your own tracking. Does not replace the system-generated task id but can be used to query tasks. Must be unique per user. Example: order-10423.
image_tailstring- Tail-frame reference image as a Base64 string or public URL. Same format requirements as image. Controls the last frame of the generated video. Example: https://example.com/last-frame.jpg.
modestring- Generation mode. std for standard (faster), pro for professional (higher quality). Defaults to std. Example: std.one of
stdpro model_namestring- Model ID for this image-to-video request. Use kling-v3 for new requests. Use Omni model IDs only with the Omni Video endpoint. Defaults to kling-v1. Example: kling-v1.one of
kling-v1kling-v1-5kling-v1-6kling-v2-masterkling-v2-1kling-v2-1-masterkling-v2-5-turbokling-v2-6kling-v3 negative_promptstring- Elements to exclude from the video. Maximum 200 characters. Example: blurry, distorted.
promptstring- Text prompt describing the desired motion. Maximum 500 characters. Example: The person slowly turns and smiles.
soundstring- Optional generated-audio switch for models that support video sound. Use on or off, or omit the field for the model default. Example: on.one of
onoff
cometapi_kling_text_to_videoStart a Kling video generation task from a text prompt.WriteCreate Kling Text-to-Video Task
Start a Kling video generation task from a text prompt. Returns code, message and data with task_id and task_status. Use this for text-to-video with Kling. Poll cometapi_kling_task_get with resource videos, sub-action text2video and the task_id.
Inputs
promptstringrequired- Text prompt describing the video to generate. Maximum 500 characters. Example: A drone shot over a misty mountain lake at sunrise.
aspect_ratiostring- Aspect ratio request. Typical rendered sizes are 1280x720 for 16:9, 720x1280 for 9:16, and 960x960 for 1:1. This endpoint does not expose an exact size field. Example: 16:9.one of
16:99:161:1 callback_urlstring- Webhook URL to receive task status updates when the task completes. Example: https://example.com/callback.
camera_controlobject- Camera motion preset or manual configuration. Omit for automatic camera movement. Example: {"type": "simple", "config": {"zoom": 5}}
cfg_scalenumber- Prompt adherence strength. Higher values follow the prompt more closely. Range: 0–1. Example: 0.5.
durationstring- Output video length in seconds. Use 5 or 10; omit to use 5. Defaults to 5. Example: 5.
external_task_idstring- Custom task id for your own tracking. Does not replace the system-generated task id but can be used to query tasks. Must be unique per user. Example: order-10423.
modestring- Generation mode. std for standard (faster), pro for professional (higher quality). The default is std. Example: std.one of
stdpro model_namestring- Model ID for this text-to-video request. Use an ordinary Kling video model ID; use Omni model IDs only with the Omni Video endpoint. Defaults to kling-v1. Example: kling-v1.one of
kling-v1kling-v1-6kling-v2-masterkling-v2-1-masterkling-v2-5-turbokling-v2-6kling-v3 negative_promptstring- Elements to exclude from the video. Maximum 200 characters. Example: blurry, low quality.
soundstring- Optional generated-audio switch for models that support video sound. Use on or off, or omit the field for the model default. Example: on.one of
onoff
cometapi_message_createGenerate a reply in the Anthropic Messages format through CometAPI, for Claude models.WriteCreate Anthropic Message
Generate a reply in the Anthropic Messages format through CometAPI, for Claude models. Returns id, model, role, content blocks (text, thinking and tool_use), stop_reason and usage. Use this when your prompts and tools use the Anthropic format. Use cometapi_chat_completion_create for the OpenAI format.
Inputs
max_tokensintegerrequired- The maximum number of tokens to generate. The model may stop before reaching this limit. When using thinking, the thinking tokens count towards this limit. Example: 1024.
messagesarrayrequired- Conversation history. Use user and assistant messages with text strings or content-block arrays. Return complete assistant content blocks when continuing a tool call. Example: [{"role": "user", "content": "Hello, Claude"}]
modelstringrequired- Claude model ID. Get model IDs from cometapi_models_list. Defaults to claude-opus-5. Example: claude-sonnet-4-5.
metadataobject- Request metadata for tracking and analytics. Example: {"user_id": "user-1234"}
stop_sequencesarray- Custom strings that cause the model to stop generating when encountered. The stop sequence is not included in the response. Example: ["END"]
systemarray- System prompt providing context and instructions to Claude. Can be a plain string or an array of content blocks (useful for prompt caching). Example: You are a helpful assistant.
temperaturenumber- Sampling temperature. The examples omit sampling overrides. Example: 0.7.
thinkingobject- Thinking configuration. The adaptive example uses type adaptive and sets output_config.effort separately. Example: {"type": "enabled", "budget_tokens": 2048}
tool_choiceobject- Controls how the model uses tools. Example: {"type": "auto"}
toolsarray- Client tools define a name and input_schema. Server tools use a versioned type and name, such as the web_fetch and web_search examples on this page. Example: [{"name": "get_weather", "input_schema": {"type": "object", "properties": {"city": {"type": "string"}}}}]
top_kinteger- Limits sampling to the k most likely tokens. The examples omit sampling overrides. Example: 40.
top_pnumber- Nucleus sampling threshold. The examples omit sampling overrides. Example: 1.
cometapi_midjourney_actionRun a follow-up action (upscale, variation, zoom, pan, reroll) on a finished Midjourney task.WriteRun Midjourney Action
Run a follow-up action (upscale, variation, zoom, pan, reroll) on a finished Midjourney task. Returns code, description and result (the new task ID). Use this with a customId from the buttons of cometapi_midjourney_task_get.
Inputs
custom_idstringrequired- Action id taken from the latest buttons array returned by the fetch endpoint. Example: MJ::JOB::upsample::1::abcd1234.
task_idstringrequired- Midjourney task id you want to continue from. Example: 1712345678901234.
choose_same_channelboolean- Whether to prefer the same provider account used by the current task. Example: true.
enable_remixboolean- Whether to force remix mode when the current action supports it. Example: false.
statestring- Custom state string. Returned as-is in the task result and webhook callback for your own tracking. Example: order-10423.
cometapi_midjourney_blendStart a Midjourney blend task that merges two to five images into a new one.WriteBlend Images with Midjourney
Start a Midjourney blend task that merges two to five images into a new one. Returns code, description and result (the task ID). Use this to combine images. Poll cometapi_midjourney_task_get with the task ID.
Inputs
base64_arrayarrayrequired- Two or more base64-encoded images to blend. Each item should be a data URI such as data:image/png;base64,xxx. Defaults to ["data:image/png;base64,<your-image-base64>"]. Example: ["data:image/png;base64,iVBORw0KGgo...", "data:image/png;base64,iVBORw0KGgo..."]
bot_typestring- Bot type to use. MID_JOURNEY for Midjourney (default), NIJI_JOURNEY for Niji. Example: MID_JOURNEY.one of
MID_JOURNEYNIJI_JOURNEY dimensionsstring- Output aspect ratio. Example: PORTRAIT.one of
PORTRAITSQUARELANDSCAPE statestring- Custom state string. Returned as-is in the task result and webhook callback for your own tracking. Example: order-10423.
cometapi_midjourney_describeStart a Midjourney describe task that writes text prompts for an image.WriteDescribe Image with Midjourney
Start a Midjourney describe task that writes text prompts for an image. Returns code, description and result (the task ID); the finished task holds the suggested prompts. Use this to get prompts from an image. Send either link or base64.
Inputs
base64string- Base64-encoded image to describe. Use a data URI such as data:image/png;base64,xxx. Provide either base64 or link. Defaults to data:image/png;base64,<your-image-base64>. Example: data:image/png;base64,iVBORw0KGgo...
bot_typestring- Bot type to use. MID_JOURNEY for Midjourney (default), NIJI_JOURNEY for Niji. Example: NIJI_JOURNEY.one of
NIJI_JOURNEYMID_JOURNEY linkstring- URL of the image to describe. Provide either link or base64. Defaults to https://your-image-host/source.png. Example: https://example.com/source.png.
statestring- Custom state string. Returned as-is in the task result and webhook callback for your own tracking. Example: order-10423.
cometapi_midjourney_imagineStart a Midjourney (or Niji) image generation task from a text prompt, with optional reference images.WriteCreate Midjourney Imagine Task
Start a Midjourney (or Niji) image generation task from a text prompt, with optional reference images. Returns code, description and result (the task ID). Use this to create images with Midjourney. Poll cometapi_midjourney_task_get with the task ID, then use cometapi_midjourney_action for upscales and variations.
Inputs
promptstringrequired- Text prompt for the generation. Supports standard Midjourney parameters such as --v, --ar, --stylize, etc. Example: a cat astronaut floating in space --ar 16:9 --v 7.
base64_arrayarray- Base64-encoded reference images. Each item should be a data URI such as data:image/png;base64,xxx. Example: ["data:image/png;base64,iVBORw0KGgo..."]
bot_typestring- Bot type to use. MID_JOURNEY for Midjourney (default), NIJI_JOURNEY for Niji. Example: MID_JOURNEY.one of
MID_JOURNEYNIJI_JOURNEY statestring- Custom state string. Returned as-is in the task result and webhook callback for your own tracking. Example: order-10423.
cometapi_minimax_video_createStart a MiniMax Hailuo video generation task from a prompt and an optional first-frame image.WriteCreate MiniMax Video Task
Start a MiniMax Hailuo video generation task from a prompt and an optional first-frame image. Returns task_id and base_resp. Use this for MiniMax video models. Poll cometapi_minimax_video_get with the task_id.
Inputs
modelstringrequired- MiniMax video model id. minimax-hailuo-02 is the currently validated CometAPI example model. Defaults to minimax-hailuo-02. Example: minimax-hailuo-02.
promptstringrequired- Prompt text. MiniMax allows long prompts, but short direct prompts are best for first-time integration tests. Example: A paper boat drifting down a rainy street.
durationinteger- Video length in seconds, such as 6. Example: 6.
first_frame_imagestring- Optional first-frame image as a public URL or base64 data URI. Example: https://example.com/first-frame.jpg.
resolutionstring- Output resolution tier, such as 768P. 512P is only available when first_frame_image is provided; text-only requests must use a higher tier. Example: 768P.
cometapi_moderation_createCheck text (or text and images) for harmful content with an OpenAI-compatible moderation model.WriteCreate Moderation
Check text (or text and images) for harmful content with an OpenAI-compatible moderation model. Returns id, model and results, each with flagged, categories and category_scores. Use this to screen user input or model output before using it.
Inputs
inputarrayrequired- Content to check. Use a string for one text input, an array of strings for batch text checks, or OpenAI-style multimodal parts such as text plus image_url when the selected model supports it. Example: I want to hurt someone.
modelstringrequired- Required moderation model ID. Use omni-moderation-latest for text and image moderation unless you have a specific moderation model requirement. Example: omni-moderation-latest.
cometapi_replicate_prediction_createRun a Replicate-hosted model (such as FLUX Schnell or FLUX Kontext) through CometAPI.WriteCreate Replicate Prediction
Run a Replicate-hosted model (such as FLUX Schnell or FLUX Kontext) through CometAPI. Returns the prediction with id, status and, when finished, output. Use this for Replicate models. Poll cometapi_replicate_prediction_get with the id.
Inputs
inputobjectrequired- Model-specific input object; every parameter of the model goes inside it, for example prompt and aspect_ratio. Example: {"prompt": "a cozy cabin in the woods", "aspect_ratio": "1:1"}
modelstringrequired- Replicate model ID as owner/name, such as black-forest-labs/flux-schnell. Example: black-forest-labs/flux-schnell.
cometapi_response_createGenerate a model response with the OpenAI Responses API through CometAPI, with optional built-in tools such as web search, structured output and multi-turn state.WriteCreate Model Response
Generate a model response with the OpenAI Responses API through CometAPI, with optional built-in tools such as web search, structured output and multi-turn state. Returns the response object with id, status, output items (messages, reasoning and tool calls), output_text and usage. Use this for OpenAI reasoning models and Responses features. Use cometapi_chat_completion_create for the Chat Completions format.
Inputs
inputarrayrequired- Text input as a string, or an array of input items (messages with text, image or file parts). Example: Write a haiku about autumn.
modelstringrequired- Model ID to use. Get model IDs from cometapi_models_list. Defaults to gpt-6-astra. Example: gpt-4o-mini.
instructionsstring- A system (or developer) message inserted into the model's context. When used with previous_response_id, instructions from the previous response are not carried over — this makes it easy to swap system messages between turns. Example: You are a concise assistant.
max_output_tokensinteger- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. Example: 1024.
metadataobject- Set of up to 16 key-value pairs that can be attached to the response. Useful for storing additional information in a structured format. Keys have a maximum length of 64 characters; values have a maximum length of 512 characters. Example: {"order_id": "10423"}
previous_response_idstring- An ID for a stored response that is accessible to the selected model and request context. Cannot be combined with conversation. The conversation-history example sends prior input and output items explicitly. Example: resp_123.
reasoningobject- Reasoning configuration for the selected model. Example: {"effort": "low"}
service_tierstring- Specifies the processing tier for the request. When set, the response will include the actual service_tier used. - auto: Uses the tier configured in project settings (default behavior). - default: Standard pricing and performance. - flex: Flexible processing with potential cost savings. - priority: Priority processing with faster response times. Example: auto.one of
autodefaultflexpriority storeboolean- Request response storage for later retrieval, when supported by the selected model and request context. Example: false.
temperaturenumber- Sampling temperature. Omit this field for GPT-6 Astra. Example: 0.7.
textobject- Configuration for text output. Use this to request structured JSON output via JSON mode or JSON Schema. Example: {"format": {"type": "json_object"}}
tool_choicestring- Controls how the model selects which tool(s) to call. - auto (default): The model decides whether and which tools to call. - none: The model will not call any tools. - required: The model must call at least one tool. - An object specifying a particular tool to use. Example: auto.
toolsarray- Tools available to the model. This page demonstrates web_search and custom function tools. Other tool types require their own configuration; see the official tool reference. Example: [{"type": "web_search"}]
top_pnumber- Nucleus sampling threshold. Omit this field for GPT-6 Astra. For sampling overrides, adjust either top_p or temperature. Example: 1.
truncationstring- The truncation strategy for handling inputs that exceed the model's context window. - auto: The model truncates the input by dropping items from the beginning of the conversation to fit. - disabled (default): The request fails with a 400 error if the input exceeds the context window. Example: auto.one of
autodisabled
cometapi_runway_text_to_videoStart a Runway video generation task from a text prompt (official Runway API format).WriteCreate Runway Text-to-Video Task
Start a Runway video generation task from a text prompt (official Runway API format). Returns the task id. Use this for Runway text-to-video. Poll cometapi_runway_task_get with the id.
Inputs
durationintegerrequired- Requested video duration in whole seconds, from 2 through 10. Example: 5.
modelstringrequired- Model ID for this request variant. Example: gen4.5.one of
gen4.5 prompt_textstringrequired- Describe the requested scene or motion in 1 to 1,000 UTF-16 code units. Example: A slow pan across a neon-lit city street in the rain.
ratiostringrequired- Requested output dimensions, expressed as width:height. Choose a value listed for this model and endpoint. Example: 1280:720.one of
1280:720720:1280 content_moderationobject- Optional content moderation settings. Omit the object to use standard moderation. Example: {"publicFigureThreshold": "auto"}
seedinteger- Optional sampling seed. Use a positive integer for an explicit seed. Omission or 0 selects a random seed. Example: 42.
cometapi_sora_video_remixStart a Sora job that remixes a completed video with a new prompt.WriteRemix Sora Video
Start a Sora job that remixes a completed video with a new prompt. Returns the new video job with id and status. Use this to change an existing Sora video. Poll cometapi_video_job_get with the new id.
Inputs
promptstringrequired- Describe the change you want to make to the existing video. Example: Make it night time with falling snow.
video_idstringrequired- ID of the completed source video. Example: video_68e688d4950481918ec389280c2f78140fcb904657674466.
cometapi_suno_lyrics_generateStart a Suno task that writes song lyrics from a topic or description.WriteGenerate Suno Lyrics
Start a Suno task that writes song lyrics from a topic or description. Returns code, message and data (the task ID); the finished task holds the title and lyrics. Use this to draft lyrics for cometapi_suno_music_generate. Poll cometapi_suno_task_get.
Inputs
promptstringrequired- Topic, theme, or description for lyrics generation. Can be a simple phrase, story concept, or specific instructions about what you want the lyrics to convey. - Example: "[Verse]\nA song about summer love and beach sunsets" - Example: "Write a romantic song about missing someone". Defaults to A song about summer love and beach sunsets.
notify_hookstring- Webhook URL for receiving lyrics generation completion notifications. When provided, the system sends a POST request with task results to this URL. - Must be a valid HTTP/HTTPS URL - Suitable for async processing and automated workflows. Defaults to https://your-server.example.com/webhook. Example: https://your-server.example.com/webhook.
cometapi_suno_music_generateStart a Suno music generation task: a song from a description (inspiration mode), or from your own lyrics, style tags and title (custom mode), or an extension of an existing clip.WriteGenerate Suno Music
Start a Suno music generation task: a song from a description (inspiration mode), or from your own lyrics, style tags and title (custom mode), or an extension of an existing clip. Returns code, message and data (the task ID). Use this to create songs. Poll cometapi_suno_task_get with the task ID. Use cometapi_suno_lyrics_generate to write lyrics first.
Inputs
continue_atstring- Float. Position in seconds to continue from. Example: 120.5.
continue_clip_idstring- Clip ID of the song to extend. Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890.
gpt_description_promptstring- Description of the song to write, for inspiration mode (leave prompt, tags and title empty). Example: an upbeat indie pop song about a summer road trip.
make_instrumentalboolean- Generate an instrumental track with no vocals. Defaults to true. Example: true.
mvstring- Suno model version. Use the model list to select an available version. Custom models use chirp-custom:{model_id}. Example: chirp-v4.
negative_tagsstring- Excluded style tags. Defaults to heavy metal. Example: heavy metal.
notify_hookstring- Callback URL: https://example.com/callback. Example: https://example.com/callback.
promptstring- Lyrics, for custom mode. Defaults to A gentle acoustic song about a paper boat at sunrise. Example: [Verse] Paper boat at sunrise...
tagsstring- Comma-separated style tags, for custom mode. Example: acoustic, folk, warm.
taskstring- Selects a workflow such as vox, mashup_condition, chop_sample_condition, sound, playlist_condition, vox_playlist_condition, stem_condition, gen_stem, cover, or extend. Omit it for standard generation. Example: extend.
titlestring- Song title, for custom mode. Example: Paper Boat.
No tools match.