开发者

API v2

单一端点,仅 POST,返回 JSON。与面板中相同的目录和价格,从你自己的网站、机器人或表格下单。

先要知道的四件事

01

你的密钥就是你的钱包

在账户页上生成它。它授权消费,所以应放在服务器配置里。只要它曾出现在浏览器、聊天或截图中,就更换它。

02

限额按服务单独设定

最小和最大数量各自设定——一个服务从10个起,下一个从500 000起。从services读取它们,并在下单前校验。

03

订单从余额中扣款

没有开票步骤。add只有在余额足以支付订单时才会成功,所以要轮询balance,并在余额归零前停下你的队列。

04

已经有面板了?无需代码

PerfectPanel和大多数面板脚本都原生读取这种格式。在你的后台进入Providers → Add provider,粘贴网站地址 — https://autosmo.com/,只要这个,不是endpoint。加上你的密钥,同步目录,设定你的加价。

一个请求,从头到尾

完整示例
下单并读回
curl -X POST https://autosmo.com/api/v2 \\
  -d key=YOUR_KEY \\
  -d action=add \\
  -d service=6758 \\
  -d link=https://instagram.com/yourprofile \\
  -d quantity=100

{"order": 8231455}

curl -X POST https://autosmo.com/api/v2 -d key=YOUR_KEY -d action=status -d order=8231455

{"charge": "0.016", "start_count": "2841", "status": "Completed",
 "remains": "0", "currency": "USD"}

服务6758是目录中的真实id。低于某服务最小值的数量会被拒绝,而不是向上取整。

交给一个智能体

复制 & 粘贴

把这个粘贴到ChatGPT、Claude或Cursor里,说明你的语言,你就得到一个可用的客户端。它带有完整的调用清单,以及那些容易出错的行为。

集成提示词
Build me a client for the AutoSMO SMM API (v2), in a language I will name.

ENDPOINT
POST https://autosmo.com/api/v2 — form-encoded body, JSON response, no other verbs.
Authentication is the field `key`, sent with every call. Server-side only.

CALLS
action=services -> array of { service, name, type, category, rate (per 1000),
                              min, max, refill:bool, cancel:bool }
action=add      params: service, link, quantity [, runs, interval]  -> { "order": id }
                custom comments: service, link, comments
action=status   params: order | orders (comma separated, max 100)
                -> { charge, start_count, status, remains, currency }
action=refill   params: order | orders (max 100)   -> { "refill": id }
action=refill_status  params: refill | refills     -> { "status": ... }
action=cancel   params: orders (max 100)
action=balance                                      -> { balance, currency }

BEHAVIOUR THAT COSTS MONEY IF IGNORED
- A timed-out `add` is not a failed `add`. The order may exist and be paid for.
  Surface it for a human; do not resend it on a timer.
- Quantity outside a service's own min/max is refused outright, so read those
  bounds from the catalogue and check before sending.
- Status is polled with `orders` and up to 100 ids at once. Per-order polling
  works in testing and dies in production.
- A 200 response can still contain per-entry errors when several ids were
  requested. Walk the entries; do not trust the envelope.
- "Partial" is a delivery that stopped early: `remains` is the shortfall and
  `charge` is the real cost. Pass that difference back to your buyer.
- Refill and cancel exist only where the catalogue flags say so.

WHAT I EXPECT FROM YOU
- One function per call, with the response parsed into typed structures.
- My order reference stored next to the id this API returns.
- Two background jobs: refresh the catalogue, and follow orders still open.
- A rehearsal switch that logs calls without sending them, and a single
  end-to-end test using the cheapest service in the catalogue.

上线前的检查清单

密钥不在任何客户能打开的地方

不在前端JavaScript里,不在移动端打包里,不在公开仓库里。任何持有它的人都能用你的余额下单。

超时会排队交给人工,而不是重试

由于add没有幂等键,一次自动重试就会让一个客户订单变成两笔已付款订单。

你的目录副本按计划刷新

当供应商改动他们的费率、限额和可用性时,这些也随之改变。过期的本地副本会以你已不再拥有的价格出售。

部分完成的订单到你客户那里也是部分完成

把remains映射到你自己的退款逻辑里。把部分交付标记为完成,是最快招来拒付的方式。

你已完整跟完一个真实订单

下目录允许的最小订单,轮询到完成,并在切换流量前确认你这边与charge分毫不差。

完整参考,由面板生成

API

HTTP方法 POST
API URL https://autosmo.com/api/v2
响应格式 JSON

Service list

Parameters Description
key Your API key
action services

响应示例

[
    {
        "service": 1,
        "name": "Followers",
        "type": "Default",
        "category": "First Category",
        "rate": "0.90",
        "min": "50",
        "max": "10000",
        "refill": true,
        "cancel": true
    },
    {
        "service": 2,
        "name": "Comments",
        "type": "Custom Comments",
        "category": "Second Category",
        "rate": "8",
        "min": "10",
        "max": "1500",
        "refill": false,
        "cancel": true
    }
]

Add order

响应示例

{
    "order": 23501
}

Order status

Parameters Description
key Your API key
action status
order Order ID

响应示例

{
    "charge": "0.27819",
    "start_count": "3572",
    "status": "Partial",
    "remains": "157",
    "currency": "USD"
}

Multiple orders status

Parameters Description
key Your API key
action status
orders Order IDs (separated by a comma, up to 100 IDs)

响应示例

{
    "1": {
        "charge": "0.27819",
        "start_count": "3572",
        "status": "Partial",
        "remains": "157",
        "currency": "USD"
    },
    "10": {
        "error": "Incorrect order ID"
    },
    "100": {
        "charge": "1.44219",
        "start_count": "234",
        "status": "In progress",
        "remains": "10",
        "currency": "USD"
    }
}

Create refill

Parameters Description
key Your API key
action refill
order Order ID

响应示例

{
    "refill": "1"
}

Create multiple refill

Parameters Description
key Your API key
action refill
orders Order IDs (separated by a comma, up to 100 IDs)

响应示例

[
    {
        "order": 1,
        "refill": 1
    },
    {
        "order": 2,
        "refill": 2
    },
    {
        "order": 3,
        "refill": {
            "error": "Incorrect order ID"
        }
    }
]

Get refill status

Parameters Description
key Your API key
action refill_status
refill Refill ID

响应示例

{
    "status": "Completed"
}

Get multiple refill status

Parameters Description
key Your API key
action refill_status
refills Refill IDs (separated by a comma, up to 100 IDs)

响应示例

[
    {
        "refill": 1,
        "status": "Completed"
    },
    {
        "refill": 2,
        "status": "Rejected"
    },
    {
        "refill": 3,
        "status": {
            "error": "Refill not found"
        }
    }
]

Create cancel

Parameters Description
key Your API key
action cancel
orders Order IDs (separated by a comma, up to 100 IDs)

响应示例

[
    {
        "order": 9,
        "cancel": {
            "error": "Incorrect order ID"
        }
    },
    {
        "order": 2,
        "cancel": 1
    }
]

User balance

Parameters Description
key Your API key
action balance

响应示例

{
    "balance": "100.84292",
    "currency": "USD"
}
PHP代码示例