Skip to main content
Assistants are reusable AI personas with persistent system prompts. Instead of sending a long system message on every request, you create an assistant once and reference it by ID.

Creating an Assistant

import requests

response = requests.post(
    "https://neuralbox.top/api/v2/assistants",
    headers={"Authorization": "Bearer nb_YOUR_API_KEY"},
    json={
        "name": "Customer Support Bot",
        "model": "claude-sonnet-4.5",
        "instructions": "You are a friendly customer support agent for NeuralBox. Answer questions about pricing, models, and API usage. Be concise and helpful. If you don't know the answer, say so.",
        "description": "Handles customer support queries"
    }
)

assistant = response.json()
print(assistant["id"])  # asst_01j9x2abc123

Using an Assistant

Once created, use the assistant ID instead of repeating the system prompt:
response = requests.post(
    "https://neuralbox.top/api/v2/generate",
    headers={"Authorization": "Bearer nb_YOUR_API_KEY"},
    json={
        "assistant_id": "asst_01j9x2abc123",
        "messages": [
            {"role": "user", "content": "What's the difference between Pro and VIP plans?"}
        ]
    }
)

print(response.json()["content"])

Marketplace Assistants

Browse community-built assistants without creating your own:
# List available marketplace assistants
response = requests.get(
    "https://neuralbox.top/api/v2/assistants/marketplace",
    headers={"Authorization": "Bearer nb_YOUR_API_KEY"},
    params={"category": "productivity", "limit": 10}
)

for assistant in response.json()["items"]:
    print(f"{assistant['name']}{assistant['description']}")

Use Cases

Use caseInstructions example
Code reviewer"Review code for bugs, security issues, and style. Provide specific line-by-line feedback."
Translator"Translate all user input to English. Preserve formatting and tone."
Data analyst"Analyze data the user provides. Always output structured JSON results with insights."
Email writer"Write professional business emails. Keep them concise, under 150 words unless asked otherwise."

Managing Assistants

# List your assistants
requests.get("/api/v2/assistants", headers=headers)

# Update an assistant
requests.put("/api/v2/assistants/asst_01j9x2abc123", 
    headers=headers,
    json={"instructions": "Updated instructions..."}
)

# Delete an assistant
requests.delete("/api/v2/assistants/asst_01j9x2abc123", headers=headers)
Assistants store only instructions — not conversation history. Each call to /generate with an assistant_id is stateless. Manage multi-turn context yourself by passing the full messages array.