Developer API
Submit AI Tools Programmatically
Use our REST API or npm SDK to batch-submit your AI tools, check credits, and manage listings — all from your codebase.
1. Get API Key
Generate a key from your Dashboard
2. Buy Credits
Purchase credits from the pricing page
3. Start Submitting
Call the API or use the SDK
Authentication
All API requests require a Bearer token in the Authorization header. Generate your API key from the Dashboard.
Authorization: Bearer aidirs_your_api_key_hereYour API key is shown only once when generated. Store it securely and never expose it in client-side code.
Credits & Plans
Each submission consumes credits based on the plan level. Purchase credits before making API calls.
starter1 credit
Basic listing + dofollow backlinks
pro2 credits
Featured + social sharing
sponsor6 credits
Featured + 7-day site-wide placement
Endpoints
/api/v1/creditsCheck your current credit balance and subscription plan.
{
"credits": 8,
"plan": "free"
}/api/v1/submitSubmit an AI tool to the directory. Name and description are automatically generated by AI.
{
"url": "https://example.com",
"plan": "starter"
}Required fields: url, plan (starter | pro | sponsor). Name and description are auto-generated by AI.
SDK / npm Package
Use the official @aidirs/sdk package for a type-safe, zero-config experience in Node.js / TypeScript projects.
pnpm add @aidirs/sdkimport { Aidirs } from "@aidirs/sdk";
const client = new Aidirs({ apiKey: process.env.AIDIRS_API_KEY! });
// Check credits
const { credits, plan } = await client.credits();
console.log(`Credits: ${credits}, Plan: ${plan}`);
// Submit a tool
const result = await client.submit({
url: "https://example.com",
plan: "pro",
});
console.log(result);
// { status, url, creditsUsed, creditsRemaining }// Submit multiple tools — stops early on 402 (no credits)
const { results, errors } = await client.batchSubmit([
{ url: "https://tool-a.com", plan: "starter" },
{ url: "https://tool-b.com", plan: "pro" },
{ url: "https://tool-c.com", plan: "starter" },
]);
console.log(`Submitted: ${results.length}, Errors: ${errors.length}`);SDK Features
Code Examples
cURL
curl https://aidirs.best/api/v1/credits \
-H "Authorization: Bearer aidirs_your_key"curl -X POST https://aidirs.best/api/v1/submit \
-H "Authorization: Bearer aidirs_your_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"plan": "starter"
}'Node.js (fetch)
const API_KEY = process.env.AIDIRS_API_KEY;
const BASE = "https://aidirs.best";
async function submitTool(url, plan = "starter") {
const res = await fetch(`${BASE}/api/v1/submit`, {
method: "POST",
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ url, plan }),
});
if (!res.ok) {
const err = await res.json();
throw new Error(err.error || res.statusText);
}
return res.json();
}
const result = await submitTool("https://example.com", "pro");
console.log(result);Python
import os, requests
API_KEY = os.environ["AIDIRS_API_KEY"]
BASE = "https://aidirs.best"
def submit_tool(url: str, plan: str = "starter"):
res = requests.post(
f"{BASE}/api/v1/submit",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
},
json={"url": url, "plan": plan},
)
res.raise_for_status()
return res.json()
result = submit_tool("https://example.com", "pro")
print(result)Error Handling
{
"error": "Insufficient credits",
"required": 2,
"available": 1
}Rate Limits
10 requests / minute
Per API key. Exceeding this limit returns a 429 status code. Retry after 60 seconds.
