Overview
Welcome to the Invicta AI API documentation. This API allows you to interact with our AI agents programmatically, enabling seamless integration of our advanced AI capabilities into your applications and workflows.
Introduction
The Invicta AI API provides a simple and powerful way to send prompts to our AI agents and receive intelligent responses. Whether you’re building a chatbot, automating customer support, or creating innovative AI-powered applications, our API offers the flexibility and functionality you need.
Authentication
All API requests require authentication using an API key. You must include your API key in the X-INVICTA-API
header for each request.
Base URL
All API requests should be made to:
Endpoints
Send Prompt
This endpoint allows you to send a prompt to an AI agent and receive a response.
HTTP Request
Headers
Header | Type | Required | Description |
---|---|---|---|
X-INVICTA-API | string | Yes | Your unique API key for authentication |
Content-Type | string | Yes | Must be set to application/json |
Request Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
userInput | string | Yes | The prompt for the AI agent |
variables | array | Yes | Key-value pairs for customizing the system prompt |
threadId | string | No | Identifier for maintaining conversation context |
modelName | string | No | Specific AI model to use for the response |
Variables Array Structure
Example Request
Response
The API returns a JSON object with the following structure:
Error Handling
The API uses standard HTTP status codes to indicate the success or failure of a request.
Status Code | Meaning |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
404 | Not Found |
500 | Internal Server Error |
Example Error Response
Best Practices
- Always use HTTPS for secure communication.
- Store your API key securely and never expose it in client-side code.
- Implement proper error handling in your application to gracefully manage API errors.
- Use the
threadId
parameter for maintaining context in multi-turn conversations. - Consider rate limiting and implement retries with exponential backoff for robust integration.
For any additional support or questions, please contact our developer support team at support@invictai.io.