> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate API 概览

> 面向多种工作流的 AI 工具

export const PlansAvailable = ({plans = [], maxPackRequired}) => {
  let displayPlans = plans;
  if (plans && plans.length === 1) {
    const lowerCasePlan = plans[0].toLowerCase();
    if (lowerCasePlan === "business") {
      displayPlans = ["Launch", "Business", "Enterprise"];
    } else if (lowerCasePlan === "premium") {
      displayPlans = ["Premium", "Launch", "Business", "Enterprise"];
    }
  }
  return <Note>
Available on {displayPlans.length === 1 ? "the " : ""}
{displayPlans.join(", ").replace(/\b\w/g, l => l.toUpperCase())}{" "}
{displayPlans.length > 1 ? "plans" : "plan"}.

{maxPackRequired && <span onClick={() => window.open('https://www.ayrshare.com/docs/additional/maxpack', '_self')} className="flex items-center mt-2 cursor-pointer">
 <span className="px-1.5 py-0.5 rounded text-sm" style={{
    backgroundColor: '#C264B6',
    color: 'white',
    fontSize: '12px'
  }}>
   Max Pack required
 </span>
</span>}
</Note>;
};

<PlansAvailable plans={["premium"]} maxPackRequired={true} />

我们提供一套 AI 工具，助你更轻松地创作社交媒体帖子。

<CardGroup cols={2}>
  <Card title="生成文本" icon="code" href="/apis/generate/post-text" horizontal />

  <Card title="重写帖子" icon="code" href="/apis/generate/rewrite-post" horizontal />

  <Card title="视频转写" icon="code" href="/apis/generate/transcribe-video" horizontal />

  <Card title="翻译帖子文本" icon="code" href="/apis/generate/translate-post" horizontal />

  <Card title="生成替代文字" icon="code" href="/apis/generate/image-alt-text" horizontal />

  <Card title="情感分析" icon="code" href="/apis/generate/sentiment" horizontal />
</CardGroup>

## Token 配额

每次调用 AI 接口都会消耗一定数量的"token"。token 数量根据你发送和接收的数据计算。每个月，你的 Max Pack 及整个 Ayrshare 账户在 Business plan 下可用 300,000 个 token，Premium Plus plan 下可用 100,000 个，Premium plan 下可用 50,000 个。

配额在每月第一天重置。要查看某次 API 调用消耗的 token 数以及本月总用量，请查看 HTTP 响应。
