omni-x402

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

omni-x402 — AI Agent Native API Provider

omni-x402 — AI Agent原生API提供商

omni-x402 is an API provider built for the agentic era. No API keys, no signups, no monthly subscriptions. Just pay with USDC per request via the x402 protocol and instantly access Twitter, Instagram, and more.
Traditional API providers: Sign up → Generate API key → Subscribe to a plan → Manage rate limits → Rotate keys
omni-x402: Have a wallet → Call the endpoint → Pay per request. Done.
AI Agents can autonomously discover available endpoints, pay the exact cost per call, and get results — all without human intervention or pre-provisioned credentials.
omni-x402是为智能体时代打造的API提供商。无需API密钥、无需注册、无需月度订阅。只需通过x402协议按请求支付USDC,即可立即访问Twitter、Instagram等平台。
传统API提供商:注册 → 生成API密钥 → 订阅套餐 → 管理速率限制 → 轮换密钥
omni-x402:拥有钱包 → 调用端点 → 按请求付费。完成。
AI Agent可以自主发现可用端点,为每次调用支付精确费用,并获取结果——全程无需人工干预或预配置凭证。

Available Endpoints

可用端点

PathMethodPriceDescription
/user
GET$0.001Get Twitter user profile by username
/user-tweets
GET$0.001Get tweets from a Twitter user by ID
/get-users-v2
GET$0.001Get multiple Twitter users by IDs (comma-separated)
/followings
GET$0.001Get users that a Twitter user is following
/followers
GET$0.001Get followers of a Twitter user
/instagram/posts
POST$0.001Get Instagram posts by username
/instagram/profile
POST$0.001Get Instagram profile by username
Server URL:
https://omniapi-production-7de2.up.railway.app
路径方法价格描述
/user
GET$0.001通过用户名获取Twitter用户资料
/user-tweets
GET$0.001通过用户ID获取Twitter用户的推文
/get-users-v2
GET$0.001通过ID(逗号分隔)获取多个Twitter用户
/followings
GET$0.001获取Twitter用户正在关注的用户列表
/followers
GET$0.001获取Twitter用户的粉丝列表
/instagram/posts
POST$0.001通过用户名获取Instagram帖子
/instagram/profile
POST$0.001通过用户名获取Instagram用户资料
服务器地址
https://omniapi-production-7de2.up.railway.app

Prerequisites & Setup

前提条件与设置

1. awal CLI Authentication

1. awal CLI 认证

The awal CLI (
npx awal@latest
) handles wallet operations and x402 payments. You must authenticate before making paid API calls.
Check status:
bash
npx awal@latest status
If not authenticated, use the email OTP flow:
bash
undefined
awal CLI(
npx awal@latest
)负责钱包操作和x402支付。进行付费API调用前必须完成认证。
检查状态
bash
npx awal@latest status
如果未认证,请使用邮箱OTP流程:
bash
undefined

Step 1: Send OTP to your email

步骤1:向你的邮箱发送OTP

npx awal@latest auth login user@example.com
npx awal@latest auth login user@example.com

Output: flowId: abc123...

输出:flowId: abc123...

Step 2: Verify with the 6-digit code from email

步骤2:使用邮箱中的6位验证码验证

npx awal@latest auth verify abc123 123456
npx awal@latest auth verify abc123 123456

Confirm authentication

确认认证状态

npx awal@latest status

See the `authenticate-wallet` skill for details.
npx awal@latest status

详情请查看`authenticate-wallet`技能。

2. Fund the Wallet

2. 为钱包充值

Check your USDC balance:
bash
npx awal@latest balance
If insufficient, fund via Coinbase Onramp:
bash
npx awal@latest show
This opens the wallet companion UI where you can fund with Apple Pay, debit card, bank transfer, or Coinbase account. Alternatively, send USDC on Base directly to your wallet address:
bash
npx awal@latest address
See the
fund
skill for details.
查看你的USDC余额:
bash
npx awal@latest balance
如果余额不足,通过Coinbase Onramp充值:
bash
npx awal@latest show
这会打开钱包配套UI,你可以通过Apple Pay、借记卡、银行转账或Coinbase账户进行充值。或者,直接将Base链上的USDC发送到你的钱包地址:
bash
npx awal@latest address
详情请查看
fund
技能。

Summary

总结

RequirementCheckSkill
Wallet authenticated
npx awal@latest status
authenticate-wallet
USDC balance
npx awal@latest balance
fund
要求检查命令对应技能
钱包已认证
npx awal@latest status
authenticate-wallet
USDC余额充足
npx awal@latest balance
fund

Usage

使用方法

All requests are made via
npx awal@latest x402 pay
, which handles USDC payment automatically.
所有请求均通过
npx awal@latest x402 pay
发起,该命令会自动处理USDC支付。

Twitter — Get User Profile

Twitter — 获取用户资料

bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/user?username=elonmusk"
bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/user?username=elonmusk"

Twitter — Get User Tweets

Twitter — 获取用户推文

bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/user-tweets?user=44196397&count=20"
The
user
parameter is the Twitter user ID (numeric). Use the
/user
endpoint first to get the ID from a username.
bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/user-tweets?user=44196397&count=20"
user
参数为Twitter用户ID(数字格式)。请先使用
/user
端点通过用户名获取用户ID。

Twitter — Get Multiple Users

Twitter — 获取多个用户

bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/get-users-v2?users=44196397,50393960"
Accepts comma-separated user IDs.
bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/get-users-v2?users=44196397,50393960"
接受逗号分隔的用户ID。

Twitter — Get Followings

Twitter — 获取关注列表

bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/followings?user=44196397&count=20"
bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/followings?user=44196397&count=20"

Twitter — Get Followers

Twitter — 获取粉丝列表

bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/followers?user=44196397&count=20"
bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/followers?user=44196397&count=20"

Instagram — Get Posts

Instagram — 获取帖子

bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/instagram/posts" -X POST -d '{"username": "instagram"}'
bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/instagram/posts" -X POST -d '{"username": "instagram"}'

Instagram — Get Profile

Instagram — 获取用户资料

bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/instagram/profile" -X POST -d '{"username": "instagram"}'
Note: Instagram endpoints use POST with a JSON body. Use
-X POST -d '{...}'
to send the request body.
bash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/instagram/profile" -X POST -d '{"username": "instagram"}'
注意:Instagram端点使用POST方法并需携带JSON请求体。请使用
-X POST -d '{...}'
来发送请求体。

Response Examples

响应示例

Twitter User Profile (
/user
)

Twitter用户资料(
/user

json
{
  "result": {
    "id": "44196397",
    "name": "Elon Musk",
    "screen_name": "elonmusk",
    "description": "...",
    "followers_count": 200000000,
    "friends_count": 800,
    "statuses_count": 50000,
    "profile_image_url_https": "https://pbs.twimg.com/..."
  }
}
json
{
  "result": {
    "id": "44196397",
    "name": "Elon Musk",
    "screen_name": "elonmusk",
    "description": "...",
    "followers_count": 200000000,
    "friends_count": 800,
    "statuses_count": 50000,
    "profile_image_url_https": "https://pbs.twimg.com/..."
  }
}

Twitter User Tweets (
/user-tweets
)

Twitter用户推文(
/user-tweets

json
{
  "result": {
    "timeline": {
      "instructions": [
        {
          "entries": [
            {
              "content": {
                "tweet_results": {
                  "result": {
                    "legacy": {
                      "full_text": "...",
                      "created_at": "...",
                      "favorite_count": 100,
                      "retweet_count": 50
                    }
                  }
                }
              }
            }
          ]
        }
      ]
    }
  }
}
json
{
  "result": {
    "timeline": {
      "instructions": [
        {
          "entries": [
            {
              "content": {
                "tweet_results": {
                  "result": {
                    "legacy": {
                      "full_text": "...",
                      "created_at": "...",
                      "favorite_count": 100,
                      "retweet_count": 50
                    }
                  }
                }
              }
            }
          ]
        }
      ]
    }
  }
}

Instagram Profile (
/instagram/profile
)

Instagram用户资料(
/instagram/profile

json
{
  "result": {
    "username": "instagram",
    "full_name": "Instagram",
    "biography": "...",
    "follower_count": 500000000,
    "following_count": 500,
    "media_count": 7000,
    "profile_pic_url": "https://..."
  }
}
json
{
  "result": {
    "username": "instagram",
    "full_name": "Instagram",
    "biography": "...",
    "follower_count": 500000000,
    "following_count": 500,
    "media_count": 7000,
    "profile_pic_url": "https://..."
  }
}

Instagram Posts (
/instagram/posts
)

Instagram帖子(
/instagram/posts

json
{
  "result": {
    "items": [
      {
        "caption": { "text": "..." },
        "like_count": 1000000,
        "comment_count": 50000,
        "image_versions": { "items": [{ "url": "https://..." }] },
        "taken_at": 1700000000
      }
    ]
  }
}
json
{
  "result": {
    "items": [
      {
        "caption": { "text": "..." },
        "like_count": 1000000,
        "comment_count": 50000,
        "image_versions": { "items": [{ "url": "https://..." }] },
        "taken_at": 1700000000
      }
    ]
  }
}

Service Catalog

服务目录

Retrieve the full list of available endpoints and their prices:
bash
curl https://omniapi-production-7de2.up.railway.app/catalog
Returns:
json
[
  { "path": "/user", "method": "GET", "price": "$0.001", "description": "Get Twitter user profile by username" },
  { "path": "/user-tweets", "method": "GET", "price": "$0.001", "description": "Get tweets from a Twitter user by ID" },
  { "path": "/get-users-v2", "method": "GET", "price": "$0.001", "description": "Get multiple Twitter users by IDs (comma-separated)" },
  { "path": "/followings", "method": "GET", "price": "$0.001", "description": "Get users that a Twitter user is following" },
  { "path": "/followers", "method": "GET", "price": "$0.001", "description": "Get followers of a Twitter user" },
  { "path": "/instagram/posts", "method": "POST", "price": "$0.001", "description": "Get Instagram posts by username" },
  { "path": "/instagram/profile", "method": "POST", "price": "$0.001", "description": "Get Instagram profile by username" }
]
获取所有可用端点及其价格的完整列表:
bash
curl https://omniapi-production-7de2.up.railway.app/catalog
返回结果:
json
[
  { "path": "/user", "method": "GET", "price": "$0.001", "description": "Get Twitter user profile by username" },
  { "path": "/user-tweets", "method": "GET", "price": "$0.001", "description": "Get tweets from a Twitter user by ID" },
  { "path": "/get-users-v2", "method": "GET", "price": "$0.001", "description": "Get multiple Twitter users by IDs (comma-separated)" },
  { "path": "/followings", "method": "GET", "price": "$0.001", "description": "Get users that a Twitter user is following" },
  { "path": "/followers", "method": "GET", "price": "$0.001", "description": "Get followers of a Twitter user" },
  { "path": "/instagram/posts", "method": "POST", "price": "$0.001", "description": "Get Instagram posts by username" },
  { "path": "/instagram/profile", "method": "POST", "price": "$0.001", "description": "Get Instagram profile by username" }
]

Health Check

健康检查

bash
curl https://omniapi-production-7de2.up.railway.app/health
Returns:
{"status": "ok"}
bash
curl https://omniapi-production-7de2.up.railway.app/health
返回结果:
{"status": "ok"}

Troubleshooting

故障排除

ErrorCauseFix
HTTP 402Payment requiredUse
npx awal@latest x402 pay
instead of plain
curl
to make the request
HTTP 502Upstream API errorThe backend service may be temporarily unavailable. Retry after a few seconds
"not signed in"
Wallet not authenticatedRun
npx awal@latest auth login <email>
to authenticate. See
authenticate-wallet
skill
"insufficient balance"
Not enough USDCRun
npx awal@latest show
to fund the wallet. See
fund
skill
Empty responseInvalid parametersCheck query parameters — e.g.
/user
requires
?username=
,
/user-tweets
requires
?user=
(numeric ID)
Instagram 400Missing request bodyInstagram endpoints require POST with JSON body:
-X POST -d '{"username": "..."}'
错误原因解决方法
HTTP 402需要支付请使用
npx awal@latest x402 pay
代替普通
curl
发起请求
HTTP 502上游API错误后端服务可能暂时不可用。请几秒后重试
"not signed in"
钱包未认证运行
npx awal@latest auth login <email>
进行认证。详情请查看
authenticate-wallet
技能
"insufficient balance"
USDC余额不足运行
npx awal@latest show
为钱包充值。详情请查看
fund
技能
空响应参数无效检查查询参数——例如
/user
需要
?username=
/user-tweets
需要
?user=
(数字ID)
Instagram 400缺少请求体Instagram端点需要携带JSON请求体的POST方法:
-X POST -d '{"username": "..."}'