API Reference
AgentLevier API
Your AI agents discover, purchase, and receive skill packs via API. JSON in, JSON out. No UI required.
Base URL
https://agentlevier.polsia.app
Quick Start — 3 API calls
GET /api/courses
GET /api/courses/expert-comptable/preview
POST /api/purchase
{
"course_id": "expert-comptable",
"payment_token": "pm_..."
}
Endpoints
List all available skill packs. Supports filtering by category and skill type.
| Parameter | Type | Description |
| category optional | string | Filter by category: finance, marketing, operations |
| skill_type optional | string | Filter by type: system_prompt |
| q optional | string | Search in title and description |
{
"ok": true,
"count": 3,
"courses": [
{
"id": 1,
"slug": "expert-comptable",
"title": "Expert Comptable IA",
"category": "finance",
"price": { "cents": 99, "formatted": "$0.99" },
"links": {
"detail": "/api/courses/1",
"preview": "/api/courses/1/preview",
"purchase": "/api/purchase"
}
}
]
}
Get full details for a single course. Accepts numeric ID or slug.
GET /api/courses/expert-comptable
GET /api/courses/1
Free preview of a skill pack. Shows metadata, compatibility, and a sample instruction without the full content.
{
"ok": true,
"preview": {
"title": "Expert Comptable IA",
"skill_pack_preview": {
"version": "1.0",
"compatibility": ["gpt-4", "claude-3", ...],
"instructions_count": 4,
"workflow_steps_count": 3,
"sample_instruction": "Analyse chaque transaction..."
}
}
}
Purchase a skill pack programmatically. With a Stripe payment token, the charge is immediate and the skill pack is returned directly. Without a token, a payment URL is returned.
| Parameter | Type | Description |
| course_id required | string|number | Course ID or slug |
| payment_token optional | string | Stripe payment method (pm_...) for instant purchase |
| email optional | string | Buyer email for receipt |
| agent_id optional | string | Your agent's identifier for tracking |
POST /api/purchase
{
"course_id": "expert-comptable",
"payment_token": "pm_1234..."
}
POST /api/purchase
{
"course_id": "expert-comptable"
}
Skill Pack Format
After purchase, you receive a complete skill pack in JSON. Inject it directly into your agent's system prompt and context.
{
"version": "1.0",
"skill_name": "expert-comptable",
"display_name": "Expert Comptable IA",
"category": "finance",
"compatibility": ["gpt-4", "gpt-4o", "claude-3", "claude-4", "mistral-large"],
"system_prompt": "Tu es un expert-comptable...",
"instructions": ["Analyse chaque transaction...", ...],
"workflow_steps": [
{ "step": 1, "action": "categorize_transaction", "description": "..." }
],
"reference_data": { },
"output_format": { }
}
Integration Example
Here's how to integrate AgentLevier into your agent with a few lines of code:
const res = await fetch('https://agentlevier.polsia.app/api/courses');
const { courses } = await res.json();
const purchase = await fetch('https://agentlevier.polsia.app/api/purchase', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
course_id: 'expert-comptable',
payment_token: 'pm_...'
})
});
const { skill_pack } = await purchase.json();
const messages = [
{ role: 'system', content: skill_pack.system_prompt },
{ role: 'user', content: 'Catégorise cette facture: Restaurant 45€ TTC' }
];