API Keys
Manage API keys and integrate your agents programmatically
Your API Keys
| Name | Key | Status | Expires | Last Used | Requests | Actions |
|---|---|---|---|---|---|---|
No API keys yetCreate your first API key to start integrating |
||||||
Your Agents
| Agent Name | Unique ID | Type | Actions |
|---|---|---|---|
| Loading agents... | |||
Quick Start
1. Get your API Key
Create an API key from the "API Keys" tab above.
2. Find your Agent ID
Each agent has a unique ID like c76_xK9mN2pQ. Find it in the "Your Agents" tab.
3. Make API Requests
# Chat with your agent
curl -X POST https://n9agents.com/v1/agents/YOUR_AGENT_ID/chat \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "Hello!"}'
Chat Endpoint
POST /v1/agents/{agentId}/chat
Send a message to your agent and get a response.
Request Body
{
"message": "What products do you have?",
"session_id": "optional-session-id",
"context": {
"user_name": "John"
}
}
Response
{
"success": true,
"response": "We have a great selection of...",
"session_id": "abc123",
"usage": {
"total_tokens": 230
}
}
List Agents
GET /v1/agents
Get all your agents with their unique IDs.
curl https://n9agents.com/v1/agents \
-H "X-API-Key: YOUR_API_KEY"
Add Knowledge
POST /v1/agents/{agentId}/knowledge
Train your agent with new Q&A pairs.
curl -X POST https://n9agents.com/v1/agents/YOUR_AGENT_ID/knowledge \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "What are your business hours?",
"answer": "We are open Mon-Fri 9am-5pm"
}'
Authentication
Include your API key in the header:
X-API-Key: n9_live_xxxxx
Rate Limits
Per day
1,000 requests
Per minute
60 requests
Error Codes
401 - Invalid API key404 - Agent not found429 - Rate limit exceeded500 - Server error0
Total Requests (30 days)
0ms
Avg Response Time
0
Active API Keys
0
Total Agents
Daily API Usage