# Kuaishou > Kuaishou Technology (快手, HKEX: 1024) is a Beijing-based short-video and live-streaming company, operating Kuaishou in mainland China and Kwai internationally. Its public developer surface spans three properties: the Kuaishou Open Platform (open.kuaishou.com), a JSON Open API for third-party apps, mini programs and merchant tools secured with OAuth 2.0; Kwai for Business (developers.kwai.com), the international advertising and marketing API; and Kling AI (kling.ai), Kuaishou's AI video and image generation platform, which ships a REST API, an official CLI and a hosted MCP server. Generated by the API Evangelist enrichment pipeline on 2026-08-12 (method: generated, source: apis.yml + repo artifacts). Not published by Kuaishou. Kuaishou DOES publish its own llms.txt for Kling AI at https://kling.ai/llms.txt — a copy is saved verbatim in this repo at llms/kuaishou-kling-llms.txt and should be preferred for anything Kling-specific. Important: the Kuaishou Open Platform console and the Kwai for Business portal are JavaScript single-page applications, and the Kling API reference is too. The mini-program documentation subtree at https://open.kuaishou.com/docs IS server-rendered (VuePress) and publicly readable — 881 pages including the server API section, the error-code tables and the developer-tools reference. Kuaishou publishes no OpenAPI or AsyncAPI description anywhere. Everything below was verified by live HTTP probe or read from a server-rendered provider page. ## APIs - [Kuaishou Open Platform API](https://open.kuaishou.com/): JSON HTTP API for third-party applications, mini programs and merchant integrations. Base URL https://open.kuaishou.com/openapi - [Kwai for Business Marketing API](https://developers.kwai.com/): international advertising, creative and reporting API for the Kwai app. Base URL https://developers.kwai.com/rest/n/mapi - [Kling AI API](https://kling.ai/dev): text-to-video, image-to-video, text-to-image, image editing and virtual try-on. Base URL https://api-singapore.klingai.com (global) or https://api-beijing.klingai.com (China) - [Kling AI MCP server](https://kling.ai/mcp): hosted, streamable HTTP, OAuth-gated ## Authentication Kuaishou Open Platform - OAuth 2.0 authorization code flow — authorize https://open.kuaishou.com/oauth2/authorize, token https://open.kuaishou.com/oauth2/access_token - OAuth 2.0 client_credentials for standalone mini programs (app_id + app_secret + grant_type=client_credentials), returning a bearer access_token - Mini-program login exchange at https://open.kuaishou.com/oauth2/mp/code2session (js_code + app_id + app_secret -> session_key + open_id); js_code lives 10 minutes, session_key 24 hours - Sensitive payloads are AES-128-CBC encrypted with the session_key and signed with sha1ToHex(rawData + sessionKey) - Payment-family calls require a `sign` parameter; a bad signature returns result 10000606 - No published scope reference Kling AI - REST: self-signed JWT from an Access Key ID + Access Key Secret, sent as `Authorization: Bearer `. A request with no header returns HTTP 401 `{"code":1001,"message":"Authorization is empty","request_id":"..."}` - MCP: OAuth 2.1 style authorization code with PKCE S256 and dynamic client registration - Protected resource metadata: https://kling.ai/.well-known/oauth-protected-resource (RFC 9728) - Authorization server metadata: https://kling.ai/.well-known/oauth-authorization-server/auth (RFC 8414) - Issuer https://kling.ai/auth; authorize/token/register/revoke endpoints under /auth - Scopes: `generation.create`, `generation.read`, `account.credit.read` Kwai for Business - No authorization or token endpoint could be confirmed without an approved advertiser account ## Conventions - Style: RPC over HTTP on the Open Platform and Kwai for Business (one path per operation); REST with async submit-then-poll on Kling AI - Error envelope (Open Platform): `{"result": , "error_msg": "", "request_id": ""}` — `result: 1` means success on the mini-program server APIs - Error envelope (Kling AI): `{"code": , "message": "", "request_id": ""}` - Error envelope (Kwai for Business, and Kling framework 404s): `{"timestamp", "status", "error", "message", "path"}` - Open Platform application-level failures are returned with HTTP 200 — inspect the body, not just the status. Kling AI and Kwai for Business use real HTTP status codes. - Every Open Platform response carries a `request_id`, echoed in `X-REQUEST-ID` and `X-KSLOGID` response headers. Kling AI carries `request_id` in the body only. - Not RFC 9457 Problem Details anywhere - No `Idempotency-Key` header anywhere. The Open Platform payment family enforces uniqueness on the merchant's own external order number instead (result 10000610 duplicate order, 10000602 order information mismatch) - No rate-limit response headers on any surface. Throttling is signalled only by result code 10000302 ("api too fast") or 10002032 (per-product throttle) ## Rate limits - Product mount: 1 per 10 minutes per external product id + poiId - Product edit: 1 per 10 seconds per external product id + poiId - Merchant withdrawal: 1 per channel per day - No numeric request-rate limit is published for the Open API generally, for Kwai for Business, or for Kling AI ## Kling AI generation flow (via the official CLI / MCP) 1. `kling login` — browser OAuth 2. `kling who_am_i` — discover identity, available models and parameter specs 3. `kling text_to_image "" --model --poll 60` (or `text_to_video`, `image_to_image`, `image_to_video`) 4. `kling query_tasks --poll` — poll until terminal; results in `works[].url` 5. `kling account` — membership tier and remaining credits MCP tools: `who_am_i`, `text_to_image`, `image_to_image`, `text_to_video`, `image_to_video`, `query_tasks`, `file_upload`, `query_membership_and_credits`. ## Known error codes - `100200100` — invalid or missing request parameters (参数为空 / 请求参数错误) - `100200102` — access denied; token invalid or expired - `10000200` — illegal parameter (Missing app_id / Missing access_token) - `10000302` — api too fast (throttled) - `10000610` — duplicate order - `10002032` — per-product operation throttle - `1026` — unknown Open API route, returned as `[1026] 404 NOT FOUND` - `1001` (Kling AI) — Authorization is empty, HTTP 401 Full catalogue, including the payment and third-party-platform tables: errors/kuaishou-error-codes.yml ## SDKs and tooling - `ks-miniprogram-ci` (npm, official) — Open Platform upload/preview/appinfo client, v1.3.16 published 2026-07-21 - `@klingai/cli-global` / `@klingai/cli-cn` (npm, official) — Kling AI CLI, a thin MCP client, v0.1.3 published 2026-07-08 - `kma` — CLI bundled with the Kuaishou Developer Tools (login, new, import, transform, preview, remote, upload, info, clear, lite, normal) - `kma-ui` (npm, official) — 20-component mini-program extension library, v0.0.4-alpha published 2024-05-24 - `com.github.kwaisocial:kwai-opensdk-withauth` (Maven, official) — Kwai Open SDK for Android - No first-party client library exists for the Kwai for Business marketing API ## Developer resources - Kuaishou Open Platform: https://open.kuaishou.com/ - Mini-program documentation (server-rendered, publicly readable): https://open.kuaishou.com/docs - Server API section: https://open.kuaishou.com/docs/develop/server/code2Session.html - Error codes: https://open.kuaishou.com/docs/develop/server/errorCode-new.html - Developer tools / CLI: https://open.kuaishou.com/docs/develop/developerTools/cli.html - Kwai for Business portal: https://developers.kwai.com/ - Kling AI developer platform: https://kling.ai/dev — pricing https://kling.ai/dev/pricing — API docs https://kling.ai/document-api - Kling AI release notes: https://kling.ai/release-note/release-history - Open source: https://github.com/kwai (Kwai — Kuaishou Open Source, 24 public repositories) ## Company - Website: https://www.kuaishou.com/ - Kwai (international): https://www.kwai.com/ - Kling AI: https://kling.ai/ - Terms of service: https://www.kuaishou.com/about/policy?tab=protocol - Privacy policy: https://www.kuaishou.com/about/policy?tab=privacy - Contact: https://www.kuaishou.com/about/contact - Feedback / help: https://www.kuaishou.com/help/feedback ## Optional - Not published on any surface: OpenAPI, AsyncAPI, Postman collection, security.txt, A2A agent card, status page, SLA, deprecation policy, trust center or named compliance certifications. - Published and machine-readable: llms.txt (kling.ai), RFC 9728 protected resource metadata, RFC 8414 authorization server metadata, npm and Maven Central package metadata.