apiosk-publish
Use this skill for API publishing and lifecycle management on https://gateway.apiosk.com.
When to use
- - You need to register a new paid API on Apiosk.
- You need to update, list, or deactivate your published API.
- You need to map an API to the latest listing groups (
api, datasets, compute). - You need to send correctly signed wallet-auth headers for management endpoints.
Required tools and files
- - INLINECODE4
- INLINECODE5
- INLINECODE6 (Foundry)
- Wallet:
-
~/.apiosk/wallet.json (preferred, includes
address +
private_key)
- or
APIOSK_PRIVATE_KEY env var
- or
--private-key flag
Management endpoints
- - INLINECODE12
- INLINECODE13
- INLINECODE14
- INLINECODE15
Signed wallet auth
All management calls require:
- - INLINECODE16
- INLINECODE17
- INLINECODE18
- INLINECODE19
Canonical message to sign:
CODEBLOCK0
Action/resource mapping:
- - register:
action=register_api, INLINECODE21 - update:
action=update_api, INLINECODE23 - mine:
action=my_apis, INLINECODE25 - delete:
action=delete_api, INLINECODE27
Listing groups and categories
Discovery groups in gateway:
- - INLINECODE28
- INLINECODE29
- INLINECODE30
Register payload currently uses category (not explicit listing_type).
Use this mapping:
- -
api -> INLINECODE34 - INLINECODE35 -> INLINECODE36
- INLINECODE37 -> INLINECODE38
Register payload
INLINECODE39 :
CODEBLOCK1
Agent behavior requirements
- - Always sign management requests; unsigned calls should be treated as invalid.
- Keep wallet value lowercased inside the signed message, even if header uses checksum case.
- If
Unauthorized, regenerate timestamp + nonce and re-sign once. - Validate HTTPS endpoint before register/update.
- Use listing-group mapping above so new listings appear in the right discovery surfaces.
apiosk-publish
使用此技能在 https://gateway.apiosk.com 上进行 API 发布和生命周期管理。
使用时机
- - 需要在 Apiosk 上注册新的付费 API。
- 需要更新、列出或停用已发布的 API。
- 需要将 API 映射到最新的列表分组(api、datasets、compute)。
- 需要为管理端点发送正确签名的钱包认证头。
所需工具和文件
- ~/.apiosk/wallet.json(推荐,包含 address + private_key)
- 或 APIOSK
PRIVATEKEY 环境变量
- 或 --private-key 标志
管理端点
- - POST /v1/apis/register
- GET /v1/apis/mine?wallet=0x...
- POST /v1/apis/:slug
- DELETE /v1/apis/:slug?wallet=0x...
签名钱包认证
所有管理调用需要:
- - x-wallet-address
- x-wallet-signature
- x-wallet-timestamp
- x-wallet-nonce
需要签名的规范消息:
text
Apiosk auth
action:
wallet:
resource:
timestamp:
nonce:
操作/资源映射:
- - register:action=registerapi,resource=register:
- update:action=updateapi,resource=update:
- mine:action=myapis,resource=mine:
- delete:action=deleteapi,resource=delete:
列表分组和分类
网关中的发现分组:
注册负载当前使用 category(而非显式的 listing_type)。
使用以下映射:
- - api -> data
- datasets -> dataset
- compute -> compute
注册负载
POST /v1/apis/register:
json
{
name: My API,
slug: my-api,
endpoint_url: https://example.com,
price_usd: 0.01,
description: My paid API,
owner_wallet: 0x...,
category: dataset
}
代理行为要求
- - 始终对管理请求进行签名;未签名的调用应视为无效。
- 在签名消息中保持钱包值为小写,即使头部使用校验和大小写。
- 如果返回 Unauthorized,重新生成时间戳和随机数并重新签名一次。
- 在注册/更新前验证 HTTPS 端点。
- 使用上述列表分组映射,以便新列表出现在正确的发现界面中。