Base URL
https://api.inkdprotocol.comAuthentication
Inkd uses x402 for write operations. No API keys. No OAuth. Your wallet pays and signs.
When you call a paid endpoint, the x402 client:
- Receives a
402 Payment Requiredresponse with payment details - Signs an EIP-3009 USDC transfer authorization
- Retries the request with an
X-PAYMENTheader
This happens automatically via @x402/fetch:
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
const signer = { address, signTypedData, readContract };
const client = new x402Client().register("eip155:8453", new ExactEvmScheme(signer));
const fetchPay = wrapFetchWithPayment(fetch, client);
// Now use fetchPay exactly like fetch — payments handled automatically
const res = await fetchPay("https://api.inkdprotocol.com/v1/projects", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ name: "my-project" }),
});Or use the SDK's ProjectsClient which handles this for you.
Read endpoints
GET endpoints are free and require no authentication.
Response format
All responses are JSON.
Success:{ "data": { ... } }{
"error": {
"code": "BAD_REQUEST",
"message": "name is required"
}
}Error codes
| Code | HTTP | Description |
|---|---|---|
BAD_REQUEST | 400 | Missing or invalid parameters |
UNAUTHORIZED | 401 | Payment missing or invalid |
NOT_FOUND | 404 | Resource does not exist |
RPC_ERROR | 502 | On-chain transaction failed |
SERVICE_UNAVAILABLE | 503 | Server wallet not configured |
Pricing
| Endpoint | Cost |
|---|---|
POST /v1/projects | $5 USDC |
POST /v1/projects/:id/versions | $2 USDC |
POST /v1/upload | Free |
All GET endpoints | Free |
