Cloudapi Help

v0.1.0

这是 Cloudapi 的能力发现页。机器可读版本见 /v1/help

公开入口:https://cloudapi.szlk.ai
鉴权:Authorization: Bearer <PROJECT_KEY>
项目治理:项目身份、权限、配额与路由均由 project key 决定,请不要再传 X-Project-ID 一类项目头。
架构定位:Cloudapi 只提供能力聚合、鉴权、配额与路由治理;多步业务编排、长任务状态机与异步 orchestration 必须放在上层应用或独立 runtime。
正式权限:analytics, connections, database, ops, github, google, gmail, youtube, x, linkedin, wechat, assets, identity, chat, models, embeddings, email, search, extract, payments, pdf, community_search, images, speech, speech_to_speech, sfx_generation, music, voice, 3d, videos, video_upscale
成功协议:id, status, capability, provider, model, data, usage, meta
错误协议:message, type, code, capability, provider, retryable
资产策略:图片/视频默认已走资产引用;音频能力可通过 response_format=asset|url 落 R2 并返回 asset 引用。

SDK Quickstart

JavaScript
const baseUrl = 'https://cloudapi.szlk.ai';
const headers = {
  Authorization: 'Bearer ' + process.env.CLOUDAPI_KEY,
  'Content-Type': 'application/json'
};

export async function createImage(prompt) {
  const res = await fetch(baseUrl + '/v1/images/generations', {
    method: 'POST',
    headers,
    body: JSON.stringify({ model: 'auto', prompt, response_format: 'url' })
  });
  return await res.json();
}

export async function createSpeechAsset(text) {
  const res = await fetch(baseUrl + '/v1/audio/speech', {
    method: 'POST',
    headers,
    body: JSON.stringify({ model: 'auto', input: text, response_format: 'asset' })
  });
  return await res.json();
}

export async function createVideo(prompt) {
  const createRes = await fetch(baseUrl + '/v1/videos', {
    method: 'POST',
    headers,
    body: JSON.stringify({ model: 'auto', prompt, duration: 5 })
  });
  const job = await createRes.json();
  const pollRes = await fetch(baseUrl + job.meta.follow_up, { headers: { Authorization: headers.Authorization } });
  return await pollRes.json();
}
      

Structured Output

chat

Cloudapi chat 已正式支持 response_format + structured_output contract,并保持 OpenAI 兼容 content 形状不变。

支持范围:当前闭环范围覆盖 non-stream 与 stream chat completions;旧项目仍可继续读取 choices[0].message.content。
stream 语义:当 structured_output 与 stream=true 同时出现时,Cloudapi 会走缓冲式 SSE:内部先完成校验/repair/retry,再向客户端返回合法的 SSE 结果流。
{
  "response_format": {
    "type": "json_object | json_schema",
    "json_schema": {
      "name": "optional_schema_name",
      "schema": "{...json schema...}"
    }
  },
  "structured_output": {
    "strict": "boolean",
    "repair": "auto | never",
    "max_retries": "0..2",
    "on_validation_error": "retry | error"
  }
}
{
  "unsupported": "STRUCTURED_OUTPUT_UNSUPPORTED",
  "schemaTooComplex": "STRUCTURED_OUTPUT_SCHEMA_TOO_COMPLEX",
  "validationFailed": "STRUCTURED_OUTPUT_VALIDATION_FAILED",
  "repairFailed": "STRUCTURED_OUTPUT_REPAIR_FAILED",
  "retryExhausted": "STRUCTURED_OUTPUT_RETRY_EXHAUSTED"
}
Provider / path 能力矩阵:
provider json_object json_schema strict_tools grammar repair_only notes
gemini yes yes yes no no Gemini native responseMimeType/responseSchema path.
vertex-ai yes yes yes no no Vertex AI Gemini path follows the same native schema capability.
openai yes yes yes no no OpenAI-compatible structured outputs path.
deepseek yes no no no yes JSON object mode only; schema strictness falls back to validate/repair.
openrouter yes no no no yes Gateway keeps OpenAI-compatible content shape and repairs when needed.
custom yes no no no yes OpenAI-compatible passthrough with Cloudapi-side validation/repair.

Helper Snippets

JS / Zod / Pydantic
const CLOUDAPI_BASE_URL = 'https://cloudapi.szlk.ai';

export async function createStructuredChatCompletion({
  apiKey,
  model = 'auto',
  messages,
  schemaName = 'structured_payload',
  schema = null,
  strict = false
}) {
  const responseFormat = schema
    ? {
        type: 'json_schema',
        json_schema: { name: schemaName, schema }
      }
    : { type: 'json_object' };

  const res = await fetch(CLOUDAPI_BASE_URL + '/v1/chat/completions', {
    method: 'POST',
    headers: {
      Authorization: 'Bearer ' + apiKey,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      model,
      messages,
      response_format: responseFormat,
      structured_output: {
        strict,
        repair: 'auto',
        max_retries: 1,
        on_validation_error: 'retry'
      }
    })
  });

  const payload = await res.json();
  if (!res.ok) {
    throw new Error(payload?.error?.code + ': ' + payload?.error?.message);
  }

  return {
    raw: payload,
    structured: payload?.data?.structured ?? JSON.parse(payload.choices?.[0]?.message?.content || 'null'),
    meta: payload?.data?.structured_output || null
  };
}
import { z } from 'zod';

type StructuredChatResult<T> = {
  raw: any;
  structured: T;
  meta: {
    requested: boolean;
    path: string;
    validated: boolean;
    repaired: boolean;
    retry_count: number;
    failure_code: string | null;
  } | null;
};

const CLOUDAPI_BASE_URL = 'https://cloudapi.szlk.ai';

type ZodToJsonSchema = (schema: z.ZodTypeAny, name?: string) => Record<string, unknown>;

export async function createStructuredChatCompletionFromZod<T>({
  apiKey,
  model = 'auto',
  messages,
  zodSchema,
  toJsonSchema,
  schemaName = 'structured_payload',
  strict = false
}: {
  apiKey: string;
  model?: string;
  messages: Array<{ role: string; content: unknown }>;
  zodSchema: z.ZodType<T>;
  toJsonSchema: ZodToJsonSchema;
  schemaName?: string;
  strict?: boolean;
}): Promise<StructuredChatResult<T>> {
  const schema = toJsonSchema(zodSchema, schemaName);

  const res = await fetch(CLOUDAPI_BASE_URL + '/v1/chat/completions', {
    method: 'POST',
    headers: {
      Authorization: 'Bearer ' + apiKey,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      model,
      messages,
      response_format: {
        type: 'json_schema',
        json_schema: { name: schemaName, schema }
      },
      structured_output: {
        strict,
        repair: 'auto',
        max_retries: 1,
        on_validation_error: 'retry'
      }
    })
  });

  const payload = await res.json();
  if (!res.ok) {
    throw new Error(String(payload?.error?.code || 'CLOUDAPI_ERROR') + ': ' + String(payload?.error?.message || 'Unknown error'));
  }

  const rawStructured = payload?.data?.structured ?? JSON.parse(payload.choices?.[0]?.message?.content || 'null');
  const structured = zodSchema.parse(rawStructured) as T;
  return {
    raw: payload,
    structured,
    meta: payload?.data?.structured_output || null
  };
}
import json
import requests
from pydantic import BaseModel

CLOUDAPI_BASE_URL = "https://cloudapi.szlk.ai"

def create_structured_chat_completion_from_pydantic(
    api_key,
    messages,
    model_class: type[BaseModel],
    model="auto",
    schema_name="structured_payload",
    strict=False,
):
    schema = model_class.model_json_schema()

    response = requests.post(
        f"{CLOUDAPI_BASE_URL}/v1/chat/completions",
        headers={
            "Authorization": f"Bearer {api_key}",
            "Content-Type": "application/json",
        },
        json={
            "model": model,
            "messages": messages,
            "response_format": {
                "type": "json_schema",
                "json_schema": {"name": schema_name, "schema": schema},
            },
            "structured_output": {
                "strict": strict,
                "repair": "auto",
                "max_retries": 1,
                "on_validation_error": "retry",
            },
        },
        timeout=120,
    )

    payload = response.json()
    if not response.ok:
        error = payload.get("error") or {}
        raise RuntimeError(f"{error.get('code')}: {error.get('message')}")

    structured = payload.get("data", {}).get("structured")
    if structured is None:
        structured = json.loads(payload["choices"][0]["message"]["content"])
    structured = model_class.model_validate(structured)

    return {
        "raw": payload,
        "structured": structured,
        "meta": payload.get("data", {}).get("structured_output"),
    }

POST /v1/assets

assets

上传或抓取资产并落到 Cloudapi R2。

async: false

GET /v1/assets/{assetId}

assets

读取资产元数据。

async: false

POST /v1/assets/{assetId}/sign

assets

为资产生成临时签名访问链接。

async: false

POST /v1/analytics/events

analytics

将业务事件写入 SZLKanalytics 正式采集链路。

async: false
{
  "event_name": "page_view",
  "anonymous_id": "anon_123",
  "page": "/dashboard",
  "properties": {
    "locale": "zh-CN"
  }
}

POST /v1/analytics/identify

analytics

将匿名访客与实名主体对齐到 SZLKanalytics identity chain。

async: false
{
  "anonymous_id": "anon_123",
  "canonical_user_id": "user_456",
  "resolution_source": "client_login"
}

GET /v1/analytics/overview

analytics

读取 SZLKanalytics 经营概览。

async: false

GET /v1/analytics/briefings/latest

analytics

读取 SZLKanalytics 最近一份日报摘要。

async: false

GET /v1/cloudflare/access/me

identity

验证 Cloudflare Access 请求头并返回当前内部 staff subject。

async: false

GET /v1/cloudflare/access/session

identity

返回 Cloudflare Access 重进后台/退出会话 helper;登录挑战仍由受保护业务 URL 自己触发。

async: false
{
  "redirect_url": "absolute http(s) URL for post-login return",
  "audience": "optional audience narrowing hint for legacy callers"
}
curl "https://cloudapi.szlk.ai/v1/cloudflare/access/session?redirect_url=https%3A%2F%2Fpassport.szlk.ai%2Fpassport-admin%3Freauth%3D1" \
  -H "Authorization: Bearer $CLOUDAPI_PROJECT_KEY"

POST /v1/cloudflare/access/verify

identity

验证 Cloudflare Access JWT,并按项目 staff policy 返回标准 staff subject。

async: false
{
  "model": "auto?",
  "token": "Cloudflare Access JWT,服务端到服务端可选;默认读取 Cf-Access-Jwt-Assertion",
  "audience": "optional audience narrowing hint"
}
curl https://cloudapi.szlk.ai/v1/cloudflare/access/me \
  -H "Authorization: Bearer $CLOUDAPI_PROJECT_KEY" \
  -H "Cf-Access-Jwt-Assertion: $CF_ACCESS_JWT"
{
  "model": "auto",
  "token": "eyJ...",
  "audience": "optional-aud-tag"
}

POST /v1/connections/oauth/start

connections

启动外部连接 OAuth 授权流程。

async: false

POST /v1/google/oauth/start

google

启动 Google delegated OAuth 授权流程。

async: false

GET /v1/google/oauth/callback

google

承接 Google delegated OAuth 回调。

async: false

POST /v1/gmail/oauth/start

gmail

启动 Gmail delegated/service OAuth 授权流程。

async: false

GET /v1/gmail/oauth/callback

gmail

兼容 Gmail OAuth 回调入口;当前正式回调复用 /v1/google/oauth/callback。

async: false

POST /v1/youtube/oauth/start

youtube

启动 YouTube OAuth 授权流程。

async: false

GET /v1/youtube/oauth/callback

youtube

承接 YouTube OAuth 回调。

async: false

POST /v1/x/oauth/start

x

启动 X OAuth 授权流程。

async: false

GET /v1/x/oauth/callback

x

承接 X OAuth 回调。

async: false

POST /v1/linkedin/oauth/start

linkedin

启动 LinkedIn OAuth 授权流程。

async: false

GET /v1/linkedin/oauth/callback

linkedin

承接 LinkedIn OAuth 回调。

async: false

POST /v1/wechat/oauth/start

wechat

启动 WeChat delegated OAuth 授权流程。

async: false

GET /v1/wechat/oauth/callback

wechat

承接 WeChat delegated OAuth 回调。

async: false

GET /v1/connections/oauth/callback/{provider}

connections

承接外部连接 OAuth 回调。

async: false

GET /v1/connections

connections

列出项目下的外部连接。

async: false

POST /v1/connections/import

connections

导入已有 delegated external connection 凭证。

async: false

GET /v1/connections/providers/{provider}/oauth-info

connections

读取指定 OAuth provider 的共享 app 与回调元信息。

async: false

GET /v1/connections/{connectionId}

connections

读取单个外部连接。

async: false

GET /v1/connections/{connectionId}/events

connections

读取外部连接审计事件。

async: false

GET /v1/connections/{connectionId}/snapshots

connections

列出外部连接结果快照。

async: false

GET /v1/connections/{connectionId}/snapshots/{snapshotId}

connections

读取单个外部连接结果快照。

async: false

DELETE /v1/connections/{connectionId}

connections

删除单个外部连接。

async: false

POST /v1/connections/{connectionId}/refresh

connections

刷新外部连接 access token。

async: false

GET /v1/github/repos

github

列出 GitHub 可访问仓库。

async: false

GET /v1/github/repos/{owner}/{repo}

github

读取单个 GitHub 仓库。

async: false

GET /v1/github/repos/{owner}/{repo}/commits

github

列出 GitHub 仓库 commits。

async: false

GET /v1/github/repos/{owner}/{repo}/pulls

github

列出 GitHub 仓库 pull requests。

async: false

POST /v1/github/repos/{owner}/{repo}/actions/workflows/{workflowId}/dispatches

github

触发 GitHub workflow dispatch。

async: false
{
  "ref": "string",
  "inputs": "object?"
}

POST /v1/github/repos/{owner}/{repo}/dispatches

github

触发 GitHub repository dispatch。

async: false
{
  "event_type": "string",
  "client_payload": "object?"
}

GET /v1/github/repos/{owner}/{repo}/actions/runs

github

列出 GitHub workflow runs。

async: false

GET /v1/github/repos/{owner}/{repo}/actions/runs/{runId}

github

读取单个 GitHub workflow run。

async: false

POST /v1/github/repos/{owner}/{repo}/actions/runs/{runId}/rerun

github

重新执行 GitHub workflow run。

async: false
{
  "enable_debug_logging": "boolean?"
}

POST /v1/github/repos/{owner}/{repo}/actions/runs/{runId}/cancel

github

取消 GitHub workflow run。

async: false

GET /v1/google/search-console/sites

google

列出 Google Search Console 可访问站点。

async: false

POST /v1/google/search-console/search-analytics/query

google

查询 Google Search Console Search Analytics。

async: false

POST /v1/gmail/drafts

gmail

创建 Gmail 草稿。

async: false

POST /v1/gmail/drafts/{draftId}/send

gmail

发送指定 Gmail 草稿。

async: false

GET /v1/gmail/messages

gmail

按 Gmail 查询语法列出邮件。

async: false

GET /v1/gmail/messages/{messageId}

gmail

读取单封 Gmail 邮件。

async: false

GET /v1/youtube/channels/me

youtube

读取当前 YouTube 连接对应的频道信息。

async: false

POST /v1/youtube/videos/upload

youtube

上传 YouTube 视频。

async: false

GET /v1/youtube/videos/{videoId}/metrics

youtube

读取指定 YouTube 视频的反馈指标。

async: false

POST /v1/youtube/videos/{videoId}/thumbnail

youtube

为指定 YouTube 视频设置缩略图。

async: false

POST /v1/youtube/videos/{videoId}/captions

youtube

为指定 YouTube 视频上传字幕。

async: false

GET /v1/x/me

x

读取当前 X 连接对应的账号资料。

async: false

POST /v1/x/posts

x

发布 X 帖子。

async: false

GET /v1/x/posts/{postId}/metrics

x

读取指定 X 帖子的反馈指标。

async: false

GET /v1/linkedin/me

linkedin

读取当前 LinkedIn 连接对应的成员资料。

async: false

GET /v1/linkedin/organizations

linkedin

列出当前 LinkedIn 连接可管理的组织页面。

async: false

POST /v1/linkedin/posts

linkedin

发布 LinkedIn 帖子。

async: false

GET /v1/linkedin/posts/{postId}/metrics

linkedin

读取指定 LinkedIn 帖子的反馈指标。

async: false

GET /v1/wechat/me

wechat

读取当前 WeChat delegated OAuth 连接对应的用户信息。

async: false

GET /v1/wechat/service/access-token

wechat

读取当前 WeChat service connection 对应的稳定 access token,供服务端发稿与指标拉取使用。

async: false

POST /v1/chat/completions

chat

文本与多模态对话生成,兼容 OpenAI Chat Completions。

async: false
{
  "model": "string",
  "messages": "array",
  "stream": "boolean",
  "response_format": "{ type: json_object|json_schema }?",
  "structured_output": "{ strict?, repair?, max_retries?, on_validation_error? }?"
}
curl -X POST https://cloudapi.szlk.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemini-2.5-flash","messages":[{"role":"user","content":"Hello"}]}'

GET /v1/models

models

列出当前 key 在当前项目上下文下可见的模型。

async: false

GET /v1/database/clusters

database

List project database clusters.

async: false

POST /v1/database/clusters/provision

database

Provision or update a project database cluster.

async: false
{
  "project_id": "string",
  "name": "string",
  "database_pool_id": "string",
  "node_placement": "object",
  "namespace": "string",
  "ha_profile": "object",
  "backup_profile": "object"
}

GET /v1/database/clusters/{clusterId}

database

Get project database cluster status.

async: false

POST /v1/database/containers/ensure

database

Install and ready a project database container on a GitOps node.

async: false
{
  "database_cluster_id": "string",
  "agent_id": "string"
}

POST /v1/database/sql

database

Execute SQL against a project database.

async: false
{
  "database_cluster_id": "string",
  "sql": "string"
}

GET /v1/database/backups

database

List project database backup records.

async: false

GET /v1/database/sources

database

List project data federation sources.

async: false

POST /v1/database/sources/register

database

Register or update a project data source.

async: false
{
  "id": "string",
  "type": "d1 | r2 | postgres | supabase | neon | external_api | cloudapi",
  "capability": "string",
  "isolation_level": "public | project | subject",
  "config_secret_ref": "string"
}

POST /v1/database/resources/register

database

Register or update a governed federated resource.

async: false
{
  "source_id": "string",
  "name": "string",
  "kind": "dataset | rowset | asset_collection | connection_snapshot",
  "default_scope": "public_publishable | project_private | subject_private"
}

POST /v1/database/records/upsert

database

Upsert a governed row into a federated resource.

async: false
{
  "resource": "string",
  "record_id": "string",
  "scope": "public_publishable | project_private | subject_private",
  "subject_type": "string",
  "subject_id": "string",
  "data": "object"
}

POST /v1/database/query

database

Query a governed federated resource without exposing the backing store.

async: false
{
  "resource": "string",
  "scope": "public_publishable | project_private | subject_private",
  "subject_type": "string",
  "subject_id": "string",
  "filters": "object",
  "limit": "number"
}

POST /v1/embeddings

embeddings

向量嵌入生成。

async: false

POST /v1/email/send

email

发送事务邮件。

async: false

POST /v1/payments/stripe/checkout-sessions

payments

创建 Stripe Checkout Session。

async: false
{
  "model": "auto",
  "mode": "subscription",
  "priceKey": "cloudwiki.pro.monthly",
  "quantity": 1,
  "successUrl": "https://example.com/billing/success",
  "cancelUrl": "https://example.com/pricing",
  "customerEmail": "user@example.com",
  "metadata": {
    "szlk_product": "cloudwiki"
  }
}

POST /v1/payments/stripe/customer-portal-sessions

payments

创建 Stripe Customer Portal Session。

async: false
{
  "model": "auto",
  "customer": "cus_123",
  "returnUrl": "https://example.com/account/billing"
}

GET /v1/payments/stripe/subscriptions/{subscriptionId}

payments

读取 Stripe subscription 原始对象。

async: false

GET /v1/payments/stripe/prices/{priceKey}

payments

按项目价格关键字读取 Stripe price 原始对象。

async: false

POST /v1/payments/stripe/webhook

payments

统一接收 Stripe webhook,验签、去重并路由到项目账务系统。

async: false
{
  "stripeDashboardEndpoint": "https://cloudapi.szlk.ai/v1/payments/stripe/webhook?channel_id=channel-stripe-1"
}

GET /v1/ops/railway/projects

ops

列出 Railway projects。

async: false

GET /v1/ops/railway/projects/{projectId}/environments

ops

列出指定 Railway project 下的 environments。

async: false

GET /v1/ops/railway/projects/{projectId}/services

ops

列出指定 Railway project 下的 services。

async: false

GET /v1/ops/railway/deployments

ops

按 project/environment/service 条件列出 Railway deployments。

async: false

GET /v1/ops/railway/variables

ops

读取指定 Railway environment/service 的变量集。

async: false

POST /v1/ops/railway/variables/upsert

ops

批量写入 Railway environment/service 变量。

async: false
{
  "project_id": "Railway project id",
  "environment_id": "Railway environment id",
  "service_id": "optional Railway service id",
  "variables": "{ KEY: VALUE }"
}

POST /v1/ops/railway/deployments/redeploy

ops

触发 Railway deployment redeploy。

async: false
{
  "deployment_id": "Railway deployment id",
  "use_previous_image_tag": "optional boolean"
}

POST /v1/ops/railway/deployments/restart

ops

重启指定 Railway deployment。

async: false
{
  "deployment_id": "Railway deployment id"
}

POST /v1/search

search

统一 Web Search / grounded search。

async: false
{
  "model": "string",
  "query": "string",
  "site_restrict": "string?",
  "date_restrict": "string?",
  "region": "string?",
  "limit": "number?",
  "include_answer": "boolean?",
  "include_content": "boolean?",
  "include_images": "boolean?",
  "content_top_n": "number?",
  "provider_options": {
    "brave": {
      "extra_snippets": "boolean?"
    },
    "jina": {
      "token_budget": "number?"
    },
    "tavily": {
      "topic": "general|news|finance?",
      "search_depth": "basic|advanced?",
      "time_range": "day|week|month|year?"
    }
  }
}
curl -X POST https://cloudapi.szlk.ai/v1/search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model":"auto",
    "query":"best project management alternatives",
    "site_restrict":"reddit.com",
    "limit":5,
    "include_answer":true,
    "include_content":true,
    "provider_options":{
      "tavily":{"topic":"general","search_depth":"advanced"},
      "brave":{"extra_snippets":true},
      "jina":{"token_budget":120000}
    }
  }'
{
  "data": {
    "results": [
      {
        "url": "https://example.com/result",
        "title": "Example Result",
        "snippet": "Brief summary",
        "content": "Optional enriched content",
        "content_level": "snippet"
      }
    ],
    "answer": "Optional native answer",
    "answer_source": "native"
  },
  "meta": {
    "provider_features": {
      "native_answer": true,
      "full_content": false,
      "extra_snippets": true
    },
    "provider_extensions": {
      "brave": {
        "extra_snippets": true,
        "include_content": true
      }
    }
  }
}

POST /v1/extract

extract

统一网页正文提取。

async: false
{
  "url": "string",
  "format": "markdown|text|html?",
  "min_content_length": "number?",
  "timeout_ms": "number?"
}
curl -X POST https://cloudapi.szlk.ai/v1/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/product","format":"markdown","min_content_length":200}'

POST /v1/pdf

pdf

使用 browser-rendering 或 browserless 渲染受保护页面或 HTML,并返回 PDF。

async: false
{
  "url": "string?",
  "html": "string?",
  "cookies": "array?",
  "headers": "object?",
  "pdf_options": "object?",
  "goto_options": "object?",
  "response_format": "binary|asset|url?"
}
curl -X POST https://cloudapi.szlk.ai/v1/pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/report/print","filename":"report.pdf","goto_options":{"waitUntil":"networkidle0","timeout":45000},"pdf_options":{"format":"A4","printBackground":true,"preferCSSPageSize":true}}'

POST /v1/community/collect

community_search

创建异步社区采集任务。

async: true
follow-up: /v1/community/collect/{jobId}

GET /v1/community/collect/{jobId}

community_search

查询异步社区采集任务结果。

async: true

POST /v1/community/search

community_search

统一平台级社区搜索。

async: false
{
  "platform": "string",
  "atomic_capability": "string?",
  "query": "string",
  "subreddit": "string?",
  "sort_by": "string?",
  "time_range": "string?",
  "limit": "number?"
}
curl -X POST https://cloudapi.szlk.ai/v1/community/search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform":"reddit","atomic_capability":"comments","query":"project management tool","subreddit":"saas","limit":20}'

POST /v1/images/generations

images

图像生成。

async: false

POST /v1/audio/speech

speech

文本转语音。

async: false

POST /v1/audio/sts

speech_to_speech

语音转语音。

async: false

POST /v1/audio/music

music

音乐生成。

async: false

POST /v1/audio/sfx

sfx_generation

音效生成。

async: false

GET /v1/audio/voices

voice

列出可用声音列表。

async: false

POST /v1/audio/voices/clone

voice

克隆声音。

async: false

POST /v1/audio/voices/design-preview

voice

生成声音设计预览。

async: false

POST /v1/audio/voices/design-save

voice

保存声音设计结果。

async: false

POST /v1/3d/generations

3d

3D 生成或 Tripo 3D 异步任务创建。

async: true
follow-up: /v1/3d/generations/{generationId}

GET /v1/3d/generations/{generationId}

3d

查询 Tripo 3D 异步任务结果。

async: true

POST /v1/videos

videos

视频生成任务创建。

async: true
follow-up: /v1/videos/{videoId}

POST /v1/videos/upscale

video_upscale

视频超分任务创建。

async: true
follow-up: /v1/videos/{videoId}

GET /v1/videos/{videoId}

videos

查询视频生成任务结果。

async: true