# AiToEarn Open Platform: English API Docs

> AiToEarn 开放平台文档

## API Docs

### Endpoint Groups

#### Overview

- [API Docs](https://docs.aitoearn.ai/en/api/index.md): AiToEarn Open Platform API documentation

#### AI Services/Video Generation

- [Video Generation Models](https://docs.aitoearn.ai/en/api-reference/get-api-ai-models-video-generation.md): Returns the currently available video generation model catalog, including each model's supported modes, resolutions, aspect ratios, durations, reference media constraints, defaults, and pricing. Models and parameter ranges may change as the service is updated, so use the real-time response from this…
- [Generate Video](https://docs.aitoearn.ai/en/api-reference/post-api-ai-video-generations.md): Interface description: Submit a video generation task, and you can pass in reference pictures, videos, and audios. The task is executed asynchronously and taskId is returned for polling results.
- [Video Task List](https://docs.aitoearn.ai/en/api-reference/get-api-ai-video-generations.md): Interface description: Get the video generation task list of the current user in pages.
- [Video Task Status](https://docs.aitoearn.ai/en/api-reference/get-api-ai-video-generations-task-id.md): Interface description: Query the execution status and results of the video generation task based on taskId.
- [Create Volcengine-format video generation task](https://docs.aitoearn.ai/en/api-reference/post-api-ai-v3-contents-generations-tasks.md): Interface description: Volcengine Ark video generation compatible endpoint for customers who have already integrated the Volcengine video generation API and want to migrate to AiToEarn without significantly changing their request structure. See the official Volcengine documentation: [Create video ge…
- [Query Volcengine-format video task](https://docs.aitoearn.ai/en/api-reference/get-api-ai-v3-contents-generations-tasks-task-id.md): Interface description: Query the status of a Volcengine-format video generation task. The response keeps the Volcengine task query format. See the official Volcengine documentation: [Query video generation task](https://www.volcengine.com/docs/82379/1521309?lang=zh).

#### AI Services/Real-person Assets

- [Create regular asset group](https://docs.aitoearn.ai/en/api-reference/post-api-ai-volcengine-assets-groups.md): Create a regular asset group whose `avatarType` is always `Virtual`. A real-person group must be created through the Complete real-person verification endpoint.
- [Asset group list](https://docs.aitoearn.ai/en/api-reference/get-api-ai-volcengine-assets-groups.md): List asset groups owned by the current API key account. Pass `avatarType=RealPerson` to list real-person groups.
- [Asset group details](https://docs.aitoearn.ai/en/api-reference/get-api-ai-volcengine-assets-groups-group-id.md): Get an asset group owned by the current API key account.
- [Update asset group](https://docs.aitoearn.ai/en/api-reference/patch-api-ai-volcengine-assets-groups-group-id.md): Update the asset group name or description. Provide at least one field.
- [Delete asset group](https://docs.aitoearn.ai/en/api-reference/delete-api-ai-volcengine-assets-groups-group-id.md): Delete the asset group and its asset records registered in AiToEarn.
- [Create asset](https://docs.aitoearn.ai/en/api-reference/post-api-ai-volcengine-assets-items.md): Register a publicly accessible image, video, or audio file in an asset group. The initial status is normally `Processing`; use Asset details to refresh it.
- [Asset list](https://docs.aitoearn.ai/en/api-reference/get-api-ai-volcengine-assets-items.md): List asset records owned by the current API key account. Use Asset details for the latest processing status.
- [Asset details](https://docs.aitoearn.ai/en/api-reference/get-api-ai-volcengine-assets-items-asset-id.md): Get asset details and refresh the upstream processing status. Only assets with `status=Active` can be used for video generation through `asset://{assetId}`.
- [Update asset](https://docs.aitoearn.ai/en/api-reference/patch-api-ai-volcengine-assets-items-asset-id.md): Update the asset name.
- [Delete asset](https://docs.aitoearn.ai/en/api-reference/delete-api-ai-volcengine-assets-items-asset-id.md): Delete the asset and its registration record in AiToEarn.
- [Create real-person verification session](https://docs.aitoearn.ai/en/api-reference/post-api-ai-volcengine-assets-visual-validation-sessions.md): Create a real-person liveness verification session. After verification, AiToEarn redirects the browser to `callbackUrl` with result parameters. Use the same API key to create and complete the session.
- [Complete real-person verification](https://docs.aitoearn.ai/en/api-reference/post-api-ai-volcengine-assets-visual-validation-sessions-byted-token-complete.md): Query the real-person verification result and create an `avatarType=RealPerson` group after success. AiToEarn retains the session for 30 minutes. Business code `12329` means the result is not ready; retry later.

#### AI Services/Image Generation

- [Image Generation Models](https://docs.aitoearn.ai/en/api-reference/get-api-ai-models-image-generation.md): Returns the currently available image generation model catalog, including each model's supported sizes, qualities, styles, credit scope, and pricing. Models and parameter ranges may change as the service is updated, so use the real-time response from this endpoint when calling the image generation A…
- [Image Editing Models](https://docs.aitoearn.ai/en/api-reference/get-api-ai-models-image-edit.md): Returns the currently available image editing model catalog, including each model's supported sizes, maximum input image count, credit scope, and pricing. Models and parameter ranges may change as the service is updated, so use the real-time response from this endpoint when calling the image editing…
- [Generate Image](https://docs.aitoearn.ai/en/api-reference/post-api-ai-image-generate.md): Interface description: Generate images synchronously, and return the generation results based on the selected model and prompt words.
- [Edit Image](https://docs.aitoearn.ai/en/api-reference/post-api-ai-image-edit.md): Interface description: Edit images synchronously, edit based on reference images and instructions.
- [Generate Image Async](https://docs.aitoearn.ai/en/api-reference/post-api-ai-image-generate-async.md): Interface description: Generate images asynchronously, return logId immediately, and poll the results through the task status query interface.
- [Edit Image Async](https://docs.aitoearn.ai/en/api-reference/post-api-ai-image-edit-async.md): Interface description: Edit the image asynchronously, return the logId immediately, and poll the results through the task status query interface.
- [Image Task Status](https://docs.aitoearn.ai/en/api-reference/get-api-ai-image-task-log-id.md): Interface description: Query the execution status and results of asynchronous image tasks based on logId.
- [OpenAI Image Generation](https://docs.aitoearn.ai/en/api-reference/post-api-ai-images-generations.md): Interface description: Compatible endpoint (Vensen diagram) of OpenAI Images API `/v1/images/generations`. The request, response and error formats fully comply with the OpenAI specification: OpenAI original `ImagesResponse` is returned, and the AiToEarn universal response package is not used; the im…
- [OpenAI Image Editing](https://docs.aitoearn.ai/en/api-reference/post-api-ai-images-edits.md): Interface description: Compatible endpoint of OpenAI Images API `/v1/images/edits` (image-to-image). The request, response and error formats fully comply with the OpenAI specifications: `application/json` and `multipart/form-data` are supported (images and mask files can be uploaded directly), OpenA…

#### AI Services/Large Language Models

- [Chat Model List](https://docs.aitoearn.ai/en/api-reference/get-api-ai-models-chat.md): Returns the currently available chat model catalog, including each model's provider channel, applicable scenes, input and output modalities, credit scope, and pricing. Models and capabilities may change as the service is updated, so use the real-time response from this endpoint when calling a chat A…
- [OpenAI Chat](https://docs.aitoearn.ai/en/api-reference/post-api-ai-chat-completions.md): Interface description: Compatible endpoint of OpenAI Chat Completions API, supports `stream` streaming output. The request, response and error formats fully comply with the OpenAI specifications; authentication uses `Authorization: Bearer <API Key>` (included by OpenAI SDK by default). Existing Open…
- [Anthropic Chat](https://docs.aitoearn.ai/en/api-reference/post-api-ai-v1-messages.md): Interface description: Compatible endpoint for the Anthropic Messages API (`/v1/messages`), supporting streaming output (SSE). Request, response and error formats follow Anthropic specifications; authentication uses the `x-api-key` header (carried by Anthropic SDK by default). Existing Anthropic SDK…
- [Gemini Chat](https://docs.aitoearn.ai/en/api-reference/post-api-ai-v1beta-models-model-generate-content.md): Interface description: Compatible endpoint of Gemini `:generateContent` API (non-streaming, aggregation returns complete results). The request and response formats follow the Gemini specification; authentication uses the `x-goog-api-key` header (carried by Gemini SDK by default). Existing Gemini SDK…
- [Gemini Streaming Chat](https://docs.aitoearn.ai/en/api-reference/post-api-ai-v1beta-models-model-stream-generate-content.md): Interface description: Compatible endpoint (streaming output, SSE) of the Gemini `:streamGenerateContent` API. The request and response formats follow the Gemini specification; authentication uses the `x-goog-api-key` header (carried by Gemini SDK by default). Existing Gemini SDK can be accessed by…

#### AI Services/Agent

- [Start Chat](https://docs.aitoearn.ai/en/api-reference/post-api-ai-agent-chat.md): Start or continue an Agent chat with `X-Api-Key`. This endpoint does not accept `Authorization: Bearer <API Key>`.
- [Session List](https://docs.aitoearn.ai/en/api-reference/get-api-ai-agent-sessions.md): List Agent sessions for the account that owns the current API Key.
- [Session Details](https://docs.aitoearn.ai/en/api-reference/get-api-ai-agent-sessions-session-id.md): Get an Agent session owned by the account of the current API Key.
- [Update Session](https://docs.aitoearn.ai/en/api-reference/patch-api-ai-agent-sessions-session-id.md): Update the session title. The title length is 1-100.
- [Delete Session](https://docs.aitoearn.ai/en/api-reference/delete-api-ai-agent-sessions-session-id.md): Delete an Agent session owned by the account of the current API Key.
- [Message list](https://docs.aitoearn.ai/en/api-reference/get-api-ai-agent-sessions-session-id-messages.md): Get the saved messages of a session. The response is a list of AI SDK UI Messages.
- [Resume Stream](https://docs.aitoearn.ai/en/api-reference/get-api-ai-agent-sessions-session-id-resume.md): Replay an in-progress Agent session stream. Authenticate with `X-Api-Key`.
- [Abort Session](https://docs.aitoearn.ai/en/api-reference/post-api-ai-agent-sessions-session-id-abort.md): Abort a running or waiting Agent run. Repeated calls are safe. After success, the session status becomes cancelled.
- [Call MCP](https://docs.aitoearn.ai/en/api-reference/post-api-ai-agent-mcp.md): Stateless MCP Streamable HTTP endpoint for Agent tools. The response is JSON.

#### Channel Management/Accounts

- [Account List](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-accounts.md): Interface description: Get the channel account list of the current user in pages.
- [Batch Delete Accounts](https://docs.aitoearn.ai/en/api-reference/delete-api-v2-channels-accounts.md): Interface description: Delete accounts in batches based on the ID list.
- [Account Details](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-accounts-account-id.md): Interface description: Get account details based on accountId.
- [Delete Account](https://docs.aitoearn.ai/en/api-reference/delete-api-v2-channels-accounts-account-id.md): Interface description: Delete the account based on accountId.
- [Account Authorization Status](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-accounts-account-id-auth-status.md): Interface description: Query the authorization status and validity period of the specified account.
- [Publish Option Values](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-accounts-account-id-publish-options-field-values.md): Interface description: Query the optional values ​​of an authorized channel account under the specified publishing option field, which is used to allow users to select additional parameters required by the platform before creating a publishing task.
- [Create Publish Option Value](https://docs.aitoearn.ai/en/api-reference/post-api-v2-channels-accounts-account-id-publish-options-field-values.md): Endpoint description: Create additional parameter values required by a platform when publishing for an authorized channel account. On success, an option `item` that can be used directly in publishing tasks is returned.

#### Channel Management/Publishing

- [Create Publish Flow](https://docs.aitoearn.ai/en/api-reference/post-api-v2-channels-publish-flows.md): Interface description: Create a multi-platform publishing Flow; one request can create multiple single-platform tasks.
- [Publish Flow Details](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-publish-flows-flow-id.md): Query a multi-account publish flow and its task status by flow ID. Obtain `flowId` from Create Publish Flow or Publish Record List.
- [Publish Now](https://docs.aitoearn.ai/en/api-reference/post-api-v2-channels-publish-tasks-task-id-publish-now.md): Interface description: Change a scheduled task to publish immediately. `taskId` comes from `data.tasks[n].id` in the successful Create Publishing Flow response. This endpoint only succeeds for tasks that are currently eligible for immediate publishing; the placeholder in the example does not trigger…
- [Retry Publish Task](https://docs.aitoearn.ai/en/api-reference/post-api-v2-channels-publish-tasks-task-id-retry.md): Interface description: Retry a failed publishing task for the current user. `taskId` comes from `data.tasks[n].id` in the successful Create Publishing Flow response. The request succeeds only when the task status allows retrying.
- [Cancel Publish Task](https://docs.aitoearn.ai/en/api-reference/delete-api-v2-channels-publish-tasks-task-id.md): Interface description: Cancel the specified publishing task. `taskId` comes from `data.tasks[n].id` in the successful Create Publishing Flow response. Cancellation may also affect a scheduled task on the platform; support depends on the platform capability.
- [Update Publish Time](https://docs.aitoearn.ai/en/api-reference/patch-api-v2-channels-publish-tasks-task-id-publish-at.md): Interface description: Update the publish time of a pending task. `taskId` comes from `data.tasks[n].id` in the successful Create Publishing Flow response. `publishAt` must be a future ISO 8601 timestamp, and the task status must allow the update.
- [Publish Record List](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-publish-records.md): List publish records for the current API key account. Omit filters to return all records, or filter by channel account, platform, publish time range, or status.
- [Queued Publish List](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-publish-records-queued.md): List publish records that are waiting, queued, or in progress. Omit filters to return all queued records, or filter by channel account, platform, or publish time range.
- [Published List](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-publish-records-published.md): List completed publish records. Omit filters to return all published records, or filter by channel account, platform, or publish time range.
- [Delete Publish Record](https://docs.aitoearn.ai/en/api-reference/delete-api-v2-channels-publish-records-record-id.md): Interface description: Delete a terminal local publishing record for the current user without deleting the platform work. `recordId` comes from the publishing record list, published list, or record detail endpoint. Only terminal records that meet the endpoint's status requirements can be deleted.
- [Publish Record Details](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-publish-records-record-id.md): Get the status, content, media URLs, and platform work information for one publish record. Obtain `recordId` from Publish Record List, Queued Publish List, or Published List.
- [App Deep Link](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-publish-records-record-id-user-action.md): > **Note:** This endpoint applies only to Douyin publish records. `recordId` must refer to a record that has not completed. Completed, failed, or other records return business error `15018`.
- [Create Douyin Check-in](https://docs.aitoearn.ai/en/api-reference/post-api-v2-channels-douyin-open-offline-qr.md): Create a Douyin offline check-in publish entry. The API key belongs to the integration partner; the person scanning the QR code does not need an AiToEarn account and does not need to authorize or bind a Douyin account in advance.
- [Get REDnote Signature](https://docs.aitoearn.ai/en/api-reference/post-api-v2-channels-rednote-open-offline-qr-share-config.md): Get the signature configuration required for the frontend to call REDnote `xhs.share`. The API key belongs to the integration partner; the person scanning the QR code does not need an AiToEarn account and does not need to authorize or bind a REDnote account in advance.

#### Channel Management/Platforms

- [Platform List](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-platforms.md): Returns the metadata catalog for currently registered channel platforms, including display information, authorization methods, content limits, media rules, publishing and engagement capabilities, publishing option schemas, and availability status. Platform capabilities may change as the service is u…
- [Platform Publish Options](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-platforms-platform-publish-options.md): Endpoint description: Queries whether a specified platform requires platform-specific publishing parameters, including their field names, value structures, and account requirements.

#### Channel Management/Works

- [Parse Work Link](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-works-link-info.md): Interface description: Parse a social-media work link for the specified platform and return the identified basic work information, snapshots, and platform-specific fields.
- [Work List](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-works-platform.md): Interface description: Query the works for an authorized account on the specified platform. This endpoint is available only when the platform declares the `work.listWorks` capability; Kwai currently returns cursor pagination.
- [Work Details](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-works-platform-platform-work-id.md): Interface description: Query details for a work on the specified platform. Before calling, check `capabilities.work.getDetail` in the Platform List; if unsupported, the response returns `code: 15080` and `data` contains only `platform` and `capability`.
- [Work Analytics](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-works-platform-platform-work-id-analytics.md): Interface description: Query statistics snapshots for a work on the specified platform. A `code: 0` response does not guarantee metrics are available; when no collected work data matches, the response returns empty `snapshots` with a `message` and omits `metrics`.
- [Verify Work Ownership](https://docs.aitoearn.ai/en/api-reference/post-api-v2-channels-works-platform-platform-work-id-ownership-verify.md): Interface description: Verify whether a work belongs to the specified account. First get the candidate account from the account list endpoint, then get the work ID from that account's work list on the target platform. `platform`, `platformWorkId`, and `candidateAccountId` must belong to the same pla…

#### Channel Management/Account Groups

- [Group List](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-account-groups.md): Interface description: Get the account group list of the current user.
- [Create Group](https://docs.aitoearn.ai/en/api-reference/post-api-v2-channels-account-groups.md): Interface description: Create account groups.
- [Batch Delete Groups](https://docs.aitoearn.ai/en/api-reference/delete-api-v2-channels-account-groups.md): Interface description: Delete account groups in batches based on the ID list.
- [Update Group](https://docs.aitoearn.ai/en/api-reference/patch-api-v2-channels-account-groups-group-id.md): Interface description: Update group information based on groupId.
- [Update Account Order](https://docs.aitoearn.ai/en/api-reference/patch-api-v2-channels-account-groups-group-id-accounts-rank.md): Interface description: Update the account sorting within the specified group.

#### Channel Management/Authorization

- [Start Platform Authorization](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-accounts-auth-platform.md): Interface description: Generate a platform authorization QR code, session ID, and expiration time.
- [Get Authorization Status](https://docs.aitoearn.ai/en/api-reference/get-api-v2-channels-accounts-auth-platform-status-session-id.md): Interface description: Poll the platform authorization session status. `sessionId` must come from `data.sessionId` in the successful response of [Start Platform Authorization](/en/api-reference/get-api-v2-channels-accounts-auth-platform); do not generate it yourself or reuse it across authorization…

#### Asset Management

- [Generate Upload Signature](https://docs.aitoearn.ai/en/api-reference/post-api-assets-upload-sign.md): Interface description: Generate a signed URL for direct transfer to object storage, and the upload path is automatically generated based on user and resource type. View the [asset upload guide](/en/use/asset-upload).
- [Confirm Asset Upload](https://docs.aitoearn.ai/en/api-reference/post-api-assets-id-confirm.md): Interface description: After the client directly transfers the object storage, callback confirmation is completed, and the final status and access path of the resource are recorded.

## OpenAPI Specs

- [aitoearn.openapi](/openapi/en/aitoearn.openapi.json)
