Skip to content
AceDataCloudPublic

About

AI Chat API: text generation and conversations. English API documentation, authentication and Quickstart examples.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

AI Chat API

Build model conversations and agent workflows with the AI Chat v2 API.

API documentation · Models and pricing · 中文文档

Get an API key

  1. Open Applications and sign in or register.
  2. Find General Application and click the copy button marked 1. If needed, select Initialize General Application first. Confirm access to this service and enough balance for your request.

Copy the API key from General Application using the button marked 1

  1. Save the copied key in your terminal. The examples add the Bearer prefix in the HTTP header.
export ACEDATACLOUD_API_KEY='YOUR_API_KEY'

Detailed API key guide · Current pricing

Quickstart

Request

curl --fail-with-body --silent --show-error https://api.acedata.cloud/aichat2/conversations \
  --header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "action": "chat",
  "model": "gpt-6.2-sol",
  "question": "Explain what an API is in one sentence.",
  "stateful": false,
  "max_turns": 1
}'

Response JSON

Illustrative response with placeholder identifiers and output values.

{
  "id": "CONVERSATION_ID",
  "answer": "An API lets software request data or actions from another service."
}

Read answer for the reply. The id identifies this conversation result.

APIs and Guides

Explore the supported endpoints and integration guides for AI Chat.

API Path Integration Guidance
AI Chat v2 Conversations API /aichat2/conversations AI Chat v2 Integration Guide
AI Chat Conversations API /aichat/conversations AI Chat Conversations API Integration Guide

Conversation management and billing

On POST /aichat2/conversations, the following case-sensitive actions cost 0 Credits and do not require model or a new question. Omitting action or sending "action":"chat" generates a reply and is billed at the selected model's rate.

To save a conversation for management, set stateful: true on a chat request and retain its returned id. Send the following bodies with the same URL, authorization and JSON headers as the Quickstart, replacing CONVERSATION_ID with that saved ID:

Action Request body Result
Retrieve {"action":"retrieve","id":"CONVERSATION_ID"} Full conversation document, including messages.
List {"action":"retrieve_batch","limit":20,"offset":0} items contains summaries without message history; total is the matching count. Optional filters: user_id, application_id, model_group, model.
Update {"action":"update","id":"CONVERSATION_ID","title":"Project discussion"} id and success: true.
Delete {"action":"delete","id":"CONVERSATION_ID"} id and success: true; deletion is irreversible.
Share {"action":"share","id":"CONVERSATION_ID"} Creates or refreshes a public read-only snapshot; returns id, share_id and shared_at.
Unshare {"action":"unshare","id":"CONVERSATION_ID"} Revokes the public snapshot; returns id and success: true.

update can also replace messages; preserve the message format returned by retrieve, as invalid history is rejected. Retrieve the full conversation before editing it. Missing conversation IDs return 404 not_found for retrieve, update, delete, share and unshare.

The original /aichat/conversations endpoint has only four free management actions: retrieve, retrieve_batch, update and delete. Its batch result uses count, not v2's total; update returns id, title and messages, and delete returns id and deleted: true. See the original API guide for its request bodies. Do not send v2 sharing actions to the original endpoint.

Gemini 4 Neon with AI Chat v2

Send a question to POST /aichat2/conversations using your application API key:

{"action":"chat","model":"gemini-4-neon","question":"Summarize the three release milestones.","stateful":false}

The answer field contains the reply. The response includes token usage.

AI Chat v2 Execution Limits

AI Chat v2 supports agent tool calls. Its model field includes gpt-6.2-astra, gpt-6.2-sol, claude-fable-5-2 and kimi-k3.1-pro, with claude-fable-5-1, claude-fable-5, and kimi-k3 still available. The Kimi options also include kimi-k2.6 and kimi-k2.7-code. Use the chatgpt model group for the GPT models and follow the v2 conversation payload. This is the v2 model list, not the separate /aichat/conversations model list documented above.

The following limits apply to v2, not the /aichat/conversations endpoint documented above.

Endpoint Optional field Range Default when omitted
POST /aichat2/conversations max_turns 1–500 500
POST /aichat2/scheduled-tasks template.max_turns 1–500 500

Setting max_turns to 1 requests a single answer without tool calls. For scheduled tasks, template.max_turns limits agent turns per run, not scheduling frequency. Each model call is still billed for actual usage; 500 is an upper bound, and a run may end earlier due to timeout, authorization, or other execution conditions.

Repeated AI execution failures do not automatically pause a scheduled task: it will try again at the next scheduled time. Automatic pausing occurs after five consecutive failures to hand the task to the execution service. Insufficient balance marks a run as failed and triggers a recharge notification. An enabled task does not mean its latest run succeeded; check run history with action: "retrieve_runs" on POST /aichat2/scheduled-tasks for execution results.

Scheduled Task Timing and Accounts

Use POST /aichat2/scheduled-tasks for these v2 controls, not /aichat/conversations.

Field Behavior
jitter_seconds Nonnegative integer seconds; defaults to 60. Automatic cloud runs get an independent random offset before or after their planned time; 0 disables it. For interval schedules, the range is capped at one quarter of interval_seconds. Local and manual runs have no jitter.
trigger_probability Number from 0 to 1, default 1. Each account independently decides whether to start at each automatic scheduled trigger: 0 skips all automatic attempts but still allows manual runs, 1 always starts, and 0.5 starts about half the attempts over time, not necessarily half the accounts each round. Applies to automatic cloud and local runs, independently of jitter; manual runs do not sample probability.
unattended_policy.connection_bindings Cloud tasks can select multiple accounts for one connector, with one account each for other connectors, up to 100 bindings total. Local execution still permits only one account per connector.

For example, update an existing task with your installed skill and connected account IDs:

{
  "action": "update",
  "id": "YOUR_TASK_ID",
  "jitter_seconds": 600,
  "trigger_probability": 0.5,
  "unattended_policy": {
    "allowed_skills": ["your-installed-skill"],
    "connection_bindings": [
      {"connector_identifier": "github/github", "connection_id": "account-one"},
      {"connector_identifier": "github/github", "connection_id": "account-two"}
    ]
  }
}

Each selected cloud account has its own schedule, conversation, authorization check, billing, and run result. One account's failure does not block the others. For automatic runs with jitter disabled, accounts share a planned time but are processed sequentially, not guaranteed to start simultaneously. The task list retains one configuration and shows the account count and earliest next trigger.

For automatic scheduled runs, probability is sampled before conversation creation, model calls, and model charges. A skipped attempt records status: "skipped" and error_code: "probability_skipped", does not pause the task, and incurs no model charge. Duplicate callbacks reuse the saved decision rather than sampling again.

Changing saved account selection reschedules the next execution; editing the prompt or probability does not. Pause, resume, and delete affect all accounts, while already-started runs may finish. Existing single-account tasks retain their settings; multi-account selection does not merge copied tasks, so pause redundant copies to avoid duplicate runs. In run history, run_accounts snapshots only the accounts selected for that run; later binding changes do not rewrite it.

Manually Trigger Selected Accounts

On POST /aichat2/scheduled-tasks, use action: "trigger_selected" to run only selected accounts for this invocation:

{
  "action": "trigger_selected",
  "id": "YOUR_TASK_ID",
  "connection_ids": ["account-one"]
}

connection_ids is required and must be a nonempty array without duplicates. Select only accounts already saved for the task's multi-account connector; fixed accounts for other connectors remain bound to each run. An out-of-scope account, including one removed from the task, rejects the entire request without starting any runs. The existing action: "trigger" without an account list still attempts all configured accounts. If an older server does not support trigger_selected, it returns an error; do not fall back to triggering all accounts.

Manual runs bypass jitter_seconds and do not wait for the previous account to finish. Each selected account starts without sampling the saved trigger_probability, even when it is 0; unselected accounts get no run records. This also applies to single-account immediate triggers, action: "trigger", and local manual runs. Saved account bindings, trigger probability, and the next automatic schedule remain unchanged; authorization checks and normal billing still apply.

When a cloud manual trigger is accepted, the API returns runs, each with run_id, status: "queued", and conversation_id. triggered_count is the number of accounts started; the compatibility field skipped_count is always 0. Top-level compatibility fields refer to the first started run. Each manual run records its effective trigger_probability as 1, without rewriting task configuration or historical records. Acceptance does not mean execution has completed successfully.

In Nexior, a multi-account task's immediate-trigger control opens an account picker with nothing selected by default; choose one or more accounts or select all. Single-account tasks trigger directly. Starting one account opens its conversation; starting multiple accounts shows the task's run history.

Search Scheduled Tasks

On POST /aichat2/scheduled-tasks, use action: "retrieve_batch" to list the current user's tasks, newest first. Optional search matches task-name substrings, ignoring English case and surrounding whitespace; it is not a regular expression. Omit it or send an empty string for all tasks. Search runs before pagination across the user's complete task list.

Request body example (use the same authenticated request setup as above):

{"action": "retrieve_batch", "search": "daily", "offset": 0, "limit": 10}

offset defaults to 0; limit defaults to 100 and must be 1–100. Read the current page from items and the total matching count from count. Increase offset by limit, keeping search unchanged, until the accumulated results reach count.

MiMo

mimo-v2.6-pro and mimo-v2.6-flash support text chat, reasoning and function tools. Consult the console for service status and account access. The dedicated contract is POST /mimo/chat/completions, with the permitted /v1/chat/completions alias. AiChat v2 uses its own conversation payload and the mimo model group.

See the MiMo integration guide for request shape and billing semantics.

Troubleshooting

  • For authentication errors, open Manage Keys to check the key’s allowed APIs, expiration and usage limit.
  • For insufficient balance, open the application and review its balance and the current service price.
  • For request validation errors, compare the model and required fields with the linked API reference.
  • For a long-running or failed task, retain task_id and trace_id when contacting support.

Trial account concurrency

Accounts with neither a successful paid top-up nor an administrator's manual credit addition may run one billable request at a time across the entire account, shared by all API keys and services. Rewards, redemption cards and transferred credits do not count as paid top-ups. A successful paid top-up or manual credit addition removes this trial restriction; balance and key usage-limit checks still apply.

A new billable request returns 429 too_many_requests while another is running. Wait for the active request's final result before submitting the next one. Free task polling remains available.

For async APIs, acceptance or a task ID is not completion: keep querying the same task until its final result. A disconnect or proxy timeout does not mean execution stopped. If a task has no terminal result for a long time, contact support with trace_id.

This restriction changes neither trial API availability nor pricing; fees are settled after execution based on actual usage.

About

AI Chat API: text generation and conversations. English API documentation, authentication and Quickstart examples.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors