Kuaishou API

Kuaishou API as documented publicly. Contract generated from the documentation by API Evangelist (2026-11-27); not the provider's own document.

GitHub OpenAPI

Operations 1

POST /oauth2/mp/code2session 小程序使用 js_code 置换 session_key 和 open_id。 #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/kuaishou:kuaishou-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

kuaishou-openapi-generated.yml Raw ↑
openapi: 3.1.0
info:
  title: Kuaishou API
  version: '2026-11-27'
  description: 'GENERATED FROM DOCUMENTATION by API Evangelist on 2026-11-27: 1 operation(s) read from 2 public documentation page(s) (each operation
    names its page in x-source). This is not the provider''s published contract; Kuaishou has published no machine-readable contract that the
    pipeline could find. Engine: anthropic.'
  x-evidence-tiers:
    code-example: 0
    documentation: 1
    pages-with-code: 2
    pages-read: 2
  x-generated-from: documentation
  x-provenance: generated
  x-authored-by: API Evangelist
  x-generated: '2026-11-27'
  x-generator: generate-contract-from-docs.py
  x-engine: anthropic
  x-sources:
  - https://open.kuaishou.com/docs/develop/server/code2Session.html
  - https://open.kuaishou.com/docs/develop/server/code2Session
servers:
- url: https://open.kuaishou.com
paths:
  /oauth2/mp/code2session:
    post:
      operationId: post_oauth2_mp_code2session
      tags:
      - Oauth2
      summary: 小程序使用 js_code 置换 session_key 和 open_id。
      x-source: https://open.kuaishou.com/docs/develop/server/code2Session.html
      parameters:
      - name: app_id
        in: query
        required: true
        schema:
          type: string
        description: 小程序的 app_id
      - name: js_code
        in: query
        required: true
        schema:
          type: string
        description: login 接口返回的 code,有效期为10分钟
      - name: app_secret
        in: query
        required: true
        schema:
          type: string
        description: 小程序的 app_secret
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostOauth2MpCode2SessionResponse'
      x-evidence:
        kind: documentation
components:
  schemas:
    PostOauth2MpCode2SessionResponse:
      type: object
      properties:
        result:
          type: integer
          description: 接口成功与否标记,1代表成功
        session_key:
          type: string
          description: 会话密钥,有效期为24小时
        open_id:
          type: string
          description: 用户在当前小程序下的id。用户在同一开发者主体(以社会信用码为标识)下的不同小程序之间的open_id是一致的
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://kling.ai/auth/token
          scopes:
            generation.create: ''
            generation.read: ''
            account.credit.read: ''
      x-source: https://open.kuaishou.com/oauth2/authorize (HTTP 200), https://open.kuaishou.com/oauth2/access_token (HTTP 200, JSON), probed
        2026-07-19; https://open.kuaishou.com/docs/develop/IndustrySolutions/introduction/miniprogram/getAccessToken.html and https://open.kuaishou.com/docs/develop/server/code2Session.html
        and https://open.kuaishou.com/docs/develop/functionAccessGuide/thirdPartyLogin.html (all HTTP 200, server-rendered, fetched 2026-08-12);
        https://kling.ai/.well-known/oauth-protected-resource and https://kling.ai/.well-known/oauth-authorization-server/auth (both HTTP 200,
        fetched 2026-08-12); https://api-singapore.klingai.com/v1/videos/text2video (HTTP 401, fetched 2026-08-12)
tags:
- name: Oauth2
security:
- oauth2: []
- oauth2: []
- oauth2:
  - generation.create
  - generation.read
  - account.credit.read