API services
Publish a REST API to the marketplace. Set per-endpoint pricing, optionally inject upstream auth, optionally offer a free tier.
Create the service
From your dashboard, click New service. You'll set:
- Name: human-friendly (e.g. "Currency Exchange Rates")
- Slug: URL identifier (e.g.
exchange-rates) - this becomes the path underproxy.apihub.io/{slug} - Description: one-line pitch that shows on marketplace cards
- Category: ai, data, search, finance, media, infra, communication, content, travel
- Base URL: where your API lives. The proxy forwards
{base_url}{endpoint_path}for each request - OpenAPI spec URL (optional): link to your spec for richer schema parsing
New services start in draft status. Add endpoints, test, then activate.
Add endpoints with pricing
Each endpoint is a (method, path) pair with a price in microdollars. Open your service's detail page in the dashboard, then Add endpoint:
- Method: GET, POST, PUT, DELETE
- Path: relative to base URL (e.g.
/latest/USD,/v1/translate) - Description: shows in agent search results and MCP tool descriptions
- Price per request: in microdollars (1 USD = 1,000,000)
- Group (optional): the section this endpoint is listed under, e.g.
MatchesorPlayers. Leave it blank to group by path - Example query string (optional): a call that works, e.g.
?city=London&days=3. Used in marketplace examples, the Test button and health checks - Parameters (optional): what callers can send. See Describing parameters
Endpoint groups
/v1/matches/live and /v1/matches/{id} both go in Matches. Set a group on an endpoint to move it. Your service page in the dashboard shows the groups exactly as agents and buyers see them.Pricing math
100= $0.0001 per call500= $0.00051000= $0.00110000= $0.01100000= $0.10
Platform commission (default 10%) is deducted at payout time. You get 90% of the listed price.
Describing parameters
Agents read an endpoint's parameters to decide what to send, so endpoints with clear parameters get called correctly far more often. When you add or edit an endpoint, fill in the Parameters table with one row per parameter: query string parameters for GET, fields of the JSON body for POST and PUT.
- Name: exactly as your API expects it, e.g.
category_id - Type: string, integer, number, boolean, array or object
- Required: tick it if the call fails without it
- Description: what it is and where to get it, e.g. "Category ID, returned by /v1/category/list"
- Example: a value that works. Agents copy it, and for GET endpoints the examples can fill in the example query string with one click
Below the table, Agents will see shows each parameter the way agents read it. You never need to write JSON, but behind the scenes the table is saved as standard JSON Schema, and the JSON tab lets you edit it directly or paste a schema from your OpenAPI spec. For example, a GET endpoint with one required and one optional query parameter:
{
"type": "object",
"properties": {
"category_id": {
"type": "integer",
"description": "Category ID, returned by /v1/category/list",
"example": 1
},
"limit": {
"type": "integer",
"description": "Maximum results to return",
"example": 10
}
},
"required": ["category_id"]
}A POST endpoint is described the same way, with the fields of its JSON body as the properties:
{
"type": "object",
"properties": {
"text": { "type": "string", "description": "Text to translate", "example": "Hello" },
"target": { "type": "string", "description": "Target language", "enum": ["de", "fr", "es"], "example": "de" }
},
"required": ["text", "target"]
}Extra JSON Schema keywords such as enum, minimum or items are kept when you edit in the table. The response schema works the same way and is optional.
Health checks
Every 30 minutes APIHub sends a GET request to each active service to measure uptime and latency, shown on your listing. Set the Health check path on your service page to a fast endpoint that needs no parameters, or include the query string it needs (e.g. /v1/search?q=test). If you leave it empty, we pick an endpoint whose request schema has no required fields, or one with an example query string. A 5xx response or a timeout counts as down. Five failures in a row suspend the service until you reactivate it from your service page.
Configure upstream auth (optional)
If your API requires authentication, you can set a header that the proxy injects on every forwarded request. Agents never see this header; it's your secret with the proxy.
upstream_auth_header: X-API-Key
upstream_auth_value: sk_provider_secret_abc123When an agent calls proxy.apihub.io/{slug}/v1/foo, the proxy fetches your {base_url}/v1/foo with X-API-Key: sk_provider_secret_abc123 appended.
Why this matters
Payment-gated upstreams are not supported here
402 challenge, the proxy cannot settle that payment on your behalf. Such calls return UPSTREAM_PAYMENT_REQUIRED and the caller is not charged. To list on APIHub, expose an endpoint that authenticates with the header above instead of an x402 challenge. APIHub handles pricing, metering and payouts. We do not add external x402 endpoints by request: the external catalog is populated automatically from on-chain x402 activity.Configure a free tier (optional)
Each service supports a free quota: N free calls per agent per month. Common pattern: offer a small free tier as marketing, then charge for serious usage.
Set free_tier_monthly_limit on the service in the dashboard. The proxy tracks per-agent usage in KV and falls through to credits/x402 once exhausted. Free calls show x-apihub-payment-protocol: free_tier in the response headers.
Override commission per service (optional)
The platform default is 10% commission. Per-service overrides are supported via the commission_rate column (admin-set). Reach out via support if you need a custom rate.
Service lifecycle
From the service detail page, the Actions card lets you:
- Activate: move from draft to active. Service appears in the marketplace.
- Pause: temporarily hide from marketplace. Calls from other agents return 404, so anyone who hardcoded the slug sees SERVICE_NOT_FOUND. Your own keys can still call it, so you can debug a paused listing before bringing it back.
- Delete: permanent removal of the service and all endpoints. Past transaction history is preserved for audit.
Testing your service before activating
The quickest check is the Test button on each endpoint in your dashboard. Add any query parameters (and a body for POST), and APIHub sends one request to your API with the same URL and upstream auth header the proxy uses for paid calls. You see the status, response time, headers and body, plus a plain explanation of common problems: a wrong header name or value, a route that 404s, a base URL that repeats part of the path, bot protection blocking APIHub, or a slow response. Tests are free and are not recorded as transactions. They work on draft and paused services too.
To test the full paid path, including pricing, call your service through the proxy. Calls to your own service from your own API keys bypass payment (marked provider_test). Use this to verify the upstream forwarding, header injection, and pricing setup before activating.
# even on a draft service, your own keys can call it for testing
curl https://proxy.apihub.io/your-slug/your-endpoint \
-H "Authorization: Bearer ahk_your_key"Limits
- Services per provider: 50 by default. Contact us if you need more
- Endpoints per service: no hard cap. Large services are grouped automatically (see endpoint groups)
- Slug uniqueness: globally unique. Pick something specific to your brand.