omni-x402
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseomni-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
可用端点
| Path | Method | Price | Description |
|---|---|---|---|
| GET | $0.001 | Get Twitter user profile by username |
| GET | $0.001 | Get tweets from a Twitter user by ID |
| GET | $0.001 | Get multiple Twitter users by IDs (comma-separated) |
| GET | $0.001 | Get users that a Twitter user is following |
| GET | $0.001 | Get followers of a Twitter user |
| POST | $0.001 | Get Instagram posts by username |
| POST | $0.001 | Get Instagram profile by username |
Server URL:
https://omniapi-production-7de2.up.railway.app| 路径 | 方法 | 价格 | 描述 |
|---|---|---|---|
| GET | $0.001 | 通过用户名获取Twitter用户资料 |
| GET | $0.001 | 通过用户ID获取Twitter用户的推文 |
| GET | $0.001 | 通过ID(逗号分隔)获取多个Twitter用户 |
| GET | $0.001 | 获取Twitter用户正在关注的用户列表 |
| GET | $0.001 | 获取Twitter用户的粉丝列表 |
| POST | $0.001 | 通过用户名获取Instagram帖子 |
| POST | $0.001 | 通过用户名获取Instagram用户资料 |
服务器地址:
https://omniapi-production-7de2.up.railway.appPrerequisites & Setup
前提条件与设置
1. awal CLI Authentication
1. awal CLI 认证
The awal CLI () handles wallet operations and x402 payments. You must authenticate before making paid API calls.
npx awal@latestCheck status:
bash
npx awal@latest statusIf not authenticated, use the email OTP flow:
bash
undefinedawal CLI()负责钱包操作和x402支付。进行付费API调用前必须完成认证。
npx awal@latest检查状态:
bash
npx awal@latest status如果未认证,请使用邮箱OTP流程:
bash
undefinedStep 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 balanceIf insufficient, fund via Coinbase Onramp:
bash
npx awal@latest showThis 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 addressSee the skill for details.
fund查看你的USDC余额:
bash
npx awal@latest balance如果余额不足,通过Coinbase Onramp充值:
bash
npx awal@latest show这会打开钱包配套UI,你可以通过Apple Pay、借记卡、银行转账或Coinbase账户进行充值。或者,直接将Base链上的USDC发送到你的钱包地址:
bash
npx awal@latest address详情请查看技能。
fundSummary
总结
| Requirement | Check | Skill |
|---|---|---|
| Wallet authenticated | | |
| USDC balance | | |
| 要求 | 检查命令 | 对应技能 |
|---|---|---|
| 钱包已认证 | | |
| USDC余额充足 | | |
Usage
使用方法
All requests are made via , which handles USDC payment automatically.
npx awal@latest x402 pay所有请求均通过发起,该命令会自动处理USDC支付。
npx awal@latest x402 payTwitter — 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 parameter is the Twitter user ID (numeric). Use the endpoint first to get the ID from a username.
user/userbash
npx awal@latest x402 pay "https://omniapi-production-7de2.up.railway.app/user-tweets?user=44196397&count=20"user/userTwitter — 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 to send the request body.
-X POST -d '{...}'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
)
/userTwitter用户资料(/user
)
/userjson
{
"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
)
/user-tweetsTwitter用户推文(/user-tweets
)
/user-tweetsjson
{
"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/profileInstagram用户资料(/instagram/profile
)
/instagram/profilejson
{
"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/postsInstagram帖子(/instagram/posts
)
/instagram/postsjson
{
"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/catalogReturns:
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/healthReturns:
{"status": "ok"}bash
curl https://omniapi-production-7de2.up.railway.app/health返回结果:
{"status": "ok"}Troubleshooting
故障排除
| Error | Cause | Fix |
|---|---|---|
| HTTP 402 | Payment required | Use |
| HTTP 502 | Upstream API error | The backend service may be temporarily unavailable. Retry after a few seconds |
| Wallet not authenticated | Run |
| Not enough USDC | Run |
| Empty response | Invalid parameters | Check query parameters — e.g. |
| Instagram 400 | Missing request body | Instagram endpoints require POST with JSON body: |
| 错误 | 原因 | 解决方法 |
|---|---|---|
| HTTP 402 | 需要支付 | 请使用 |
| HTTP 502 | 上游API错误 | 后端服务可能暂时不可用。请几秒后重试 |
| 钱包未认证 | 运行 |
| USDC余额不足 | 运行 |
| 空响应 | 参数无效 | 检查查询参数——例如 |
| Instagram 400 | 缺少请求体 | Instagram端点需要携带JSON请求体的POST方法: |