Download OpenAPI specification:Download
This is the API documentation for the Inference backend.
All API endpoints require authentication using an API key.
The API key must be provided in the Authorization header with each request using the Bearer scheme.
Example:
curl -X GET https://api.neospace.ai/v1/models \
-H "Authorization: Bearer your_api_key_here"
Missing or invalid API keys will result in a 401 Unauthorized response.
Retrieve a list of action groups with pagination
| pageSize | integer Default: 10 pageSize |
| page | integer Default: 0 page |
{- "data": [
- {
- "created_at": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "updated_at": "string"
}
], - "page": 0,
- "page_size": 0
}Create a new action group
Action Group creation request
| description required | string |
| name required | string |
{- "description": "string",
- "name": "string"
}{- "created_at": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "updated_at": "string"
}Update an action group by ID
| id required | string Action group ID |
Action group update request
| description | string |
| name | string |
{- "description": "string",
- "name": "string"
}{- "created_at": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "updated_at": "string"
}Retrieve a list of actions with pagination
| pageSize | integer Default: 10 pageSize |
| page | integer Default: 0 page |
{- "data": [
- {
- "created_at": "string",
- "custom_insights": "string",
- "description": "string",
- "end_date": "string",
- "group": "string",
- "id": "string",
- "name": "string",
- "priority": "very_low",
- "start_date": "string",
- "status": "archived",
- "type": "string",
- "updated_at": "string"
}
], - "page": 0,
- "page_size": 0
}Create a new action
Action creation request
| custom_insights | string |
| description required | string |
| end_date | string |
| name required | string |
| priority required | string (model.ActionPriority) Enum: "very_low" "low" "medium" "high" "very_high" |
| start_date | string |
| status | string (model.ActionStatus) Enum: "archived" "draft" "active" "inactive" |
| type required | string |
{- "custom_insights": "string",
- "description": "string",
- "end_date": "string",
- "name": "string",
- "priority": "very_low",
- "start_date": "string",
- "status": "archived",
- "type": "string"
}{- "created_at": "string",
- "custom_insights": "string",
- "description": "string",
- "end_date": "string",
- "group": "string",
- "id": "string",
- "name": "string",
- "priority": "very_low",
- "start_date": "string",
- "status": "archived",
- "type": "string",
- "updated_at": "string"
}Retrieve an action by ID
| id required | string Action ID |
{- "created_at": "string",
- "custom_insights": "string",
- "description": "string",
- "end_date": "string",
- "group": "string",
- "id": "string",
- "name": "string",
- "priority": "very_low",
- "start_date": "string",
- "status": "archived",
- "type": "string",
- "updated_at": "string"
}Update an action by ID
| id required | string Action ID |
Action update request
| custom_insights | string |
| description | string |
| end_date | string <date-time> |
| group | string |
| name | string |
| priority | string (model.ActionPriority) Enum: "very_low" "low" "medium" "high" "very_high" |
| start_date | string <date-time> |
| status | string (model.ActionStatus) Enum: "archived" "draft" "active" "inactive" |
| type | string |
{- "custom_insights": "string",
- "description": "string",
- "end_date": "2019-08-24T14:15:22Z",
- "group": "string",
- "name": "string",
- "priority": "very_low",
- "start_date": "2019-08-24T14:15:22Z",
- "status": "archived",
- "type": "string"
}{- "created_at": "string",
- "custom_insights": "string",
- "description": "string",
- "end_date": "string",
- "group": "string",
- "id": "string",
- "name": "string",
- "priority": "very_low",
- "start_date": "string",
- "status": "archived",
- "type": "string",
- "updated_at": "string"
}Create a new API key
API key creation request
| allowed_ips | Array of strings |
| created_at | string |
| created_by | string |
| description | string |
string | |
| environment | string (model.Environment) Enum: "prod" "play" |
| id | string |
| is_active | boolean |
| key | string |
| last_used | string |
| name | string |
| scopes | Array of strings |
| user_id | string |
{- "allowed_ips": [
- "string"
], - "created_at": "string",
- "created_by": "string",
- "description": "string",
- "email": "string",
- "environment": "prod",
- "id": "string",
- "is_active": true,
- "key": "string",
- "last_used": "string",
- "name": "string",
- "scopes": [
- "string"
], - "user_id": "string"
}{- "allowed_ips": [
- "string"
], - "created_at": "string",
- "created_by": "string",
- "description": "string",
- "email": "string",
- "environment": "prod",
- "id": "string",
- "is_active": true,
- "key": "string",
- "last_used": "string",
- "name": "string",
- "scopes": [
- "string"
], - "user_id": "string"
}Retrieve an API key by ID
| id required | string API key ID |
{- "allowed_ips": [
- "string"
], - "created_at": "string",
- "created_by": "string",
- "description": "string",
- "email": "string",
- "environment": "prod",
- "id": "string",
- "is_active": true,
- "key": "string",
- "last_used": "string",
- "name": "string",
- "scopes": [
- "string"
], - "user_id": "string"
}Retrieve a paginated list of chat conversations, optionally filtered by name
| page | integer Page number (default 1) |
| page_size | integer Number of items per page (default 10) |
| name | string Filter chats by name |
{- "data": [
- {
- "id": "string",
- "messages": [
- {
- "content": "string",
- "name": "string",
- "role": "string",
- "tool_call": [
- {
- "function": {
- "arguments": "string",
- "name": "string"
}, - "id": "string",
- "type": "string"
}
]
}
], - "name": "string"
}
], - "page": 0,
- "page_size": 0
}Generate a chat completion based on provided messages and parameters
Chat completion request with messages and parameters
| api_key | string |
| echo | boolean |
| expert_ids | Array of strings |
| guard_enabled | boolean |
| guard_reasoning_enabled | boolean |
| id | string |
| max_tokens | integer |
Array of objects (request.Message) | |
object | |
| model | string |
| name | string |
| router_enabled | boolean |
| router_reasoning_enabled | boolean |
| stream | boolean |
| tags | Array of strings |
| temperature | number |
| top_p | number |
| type | string |
| user | string |
{- "api_key": "string",
- "echo": true,
- "expert_ids": [
- "string"
], - "guard_enabled": true,
- "guard_reasoning_enabled": true,
- "id": "string",
- "max_tokens": 0,
- "messages": [
- {
- "content": "string",
- "name": "string",
- "role": "string",
- "tool_call": [
- {
- "function": {
- "arguments": "string",
- "name": "string"
}, - "id": "string",
- "type": "string"
}
]
}
], - "metadata": {
- "property1": null,
- "property2": null
}, - "model": "string",
- "name": "string",
- "router_enabled": true,
- "router_reasoning_enabled": true,
- "stream": true,
- "tags": [
- "string"
], - "temperature": 0,
- "top_p": 0,
- "type": "string",
- "user": "string"
}{- "choices": [
- {
- "finish_reason": "string",
- "index": 0,
- "message": {
- "content": "string",
- "reasoning_content": "string",
- "role": "string",
- "tool_calls": [
- {
- "function": {
- "arguments": "string",
- "name": "string"
}, - "id": "string",
- "type": "string"
}
]
}
}
], - "created_at": "string",
- "guard": {
- "category": "string",
- "content": "string",
- "elapsed_time_in_seconds": 0,
- "finish_reason": "string",
- "id": "string",
- "reasoning_content": "string",
- "usage": {
- "completion_tokens": 0,
- "prompt_tokens": 0,
- "total_tokens": 0
}
}, - "id": "string",
- "model": "string",
- "object": "string",
- "router": {
- "content": "string",
- "elapsed_time_in_seconds": 0,
- "expert": "string",
- "finish_reason": "string",
- "id": "string",
- "reasoning_content": "string",
- "usage": {
- "completion_tokens": 0,
- "prompt_tokens": 0,
- "total_tokens": 0
}
}, - "usage": {
- "completion_tokens": 0,
- "prompt_tokens": 0,
- "total_tokens": 0
}
}Retrieve a chat conversation by its unique identifier
| id required | string Chat identifier |
{- "id": "string",
- "messages": [
- {
- "content": "string",
- "name": "string",
- "role": "string",
- "tool_call": [
- {
- "function": {
- "arguments": "string",
- "name": "string"
}, - "id": "string",
- "type": "string"
}
]
}
], - "name": "string"
}Update an chat by ID
| id required | string Chat ID |
Chat update request
| guard_enabled | boolean |
object (model.ChatResponse) | |
| max_tokens | integer |
Array of objects (model.Message) | |
| model | string |
| name | string |
| router_enabled | boolean |
| temperature | number |
{- "guard_enabled": true,
- "last_response": {
- "answer": {
- "content": "string",
- "reasoning_content": "string",
- "tool_calls": [
- {
- "function": {
- "arguments": "string",
- "name": "string"
}, - "id": "string",
- "index": 0,
- "type": "string"
}
]
}, - "guard": {
- "category": "string",
- "content": "string",
- "reasoning_content": "string"
}, - "router": {
- "content": "string",
- "expert": "string",
- "reasoning_content": "string"
}
}, - "max_tokens": 0,
- "messages": [
- {
- "content": "string",
- "created_at": "string",
- "function": {
- "function": {
- "arguments": "string",
- "name": "string"
}, - "id": "string",
- "index": 0,
- "type": "string"
}, - "inference_log_id": "string",
- "name": "string",
- "role": "string",
- "tool_calls": [
- {
- "function": {
- "arguments": "string",
- "name": "string"
}, - "id": "string",
- "index": 0,
- "type": "string"
}
]
}
], - "model": "string",
- "name": "string",
- "router_enabled": true,
- "temperature": 0
}{- "id": "string",
- "messages": [
- {
- "content": "string",
- "name": "string",
- "role": "string",
- "tool_call": [
- {
- "function": {
- "arguments": "string",
- "name": "string"
}, - "id": "string",
- "type": "string"
}
]
}
], - "name": "string"
}Retrieve a chat with a window of the conversation
| id required | string Chat identifier |
{- "id": "string",
- "messages": [
- {
- "content": "string",
- "name": "string",
- "role": "string",
- "tool_call": [
- {
- "function": {
- "arguments": "string",
- "name": "string"
}, - "id": "string",
- "type": "string"
}
]
}
], - "name": "string"
}Get a comprehensive list of all available experts
{- "data": [
- {
- "context": "string",
- "created_at": "string",
- "description": "string",
- "file_context": [
- {
- "property1": "string",
- "property2": "string"
}
], - "id": "string",
- "name": "string",
- "tools": [
- {
- "function": {
- "description": "string",
- "name": "string",
- "parameters": {
- "property1": null,
- "property2": null
}, - "strict": true
}, - "type": "string"
}
], - "updated_at": "string"
}
], - "page": 0,
- "page_size": 0
}Create a new expert with custom configuration and prompt templates
Expert configuration data
| context | string |
| description required | string |
Array of objects | |
| name required | string |
Array of objects (model.ExpertTool) |
{- "context": "string",
- "description": "string",
- "file_context": [
- {
- "property1": "string",
- "property2": "string"
}
], - "name": "string",
- "tools": [
- {
- "function": {
- "description": "string",
- "name": "string",
- "parameters": {
- "property1": null,
- "property2": null
}, - "strict": true
}, - "type": "string"
}
]
}{- "context": "string",
- "created_at": "string",
- "description": "string",
- "file_context": [
- {
- "property1": "string",
- "property2": "string"
}
], - "id": "string",
- "name": "string",
- "tools": [
- {
- "function": {
- "description": "string",
- "name": "string",
- "parameters": {
- "property1": null,
- "property2": null
}, - "strict": true
}, - "type": "string"
}
], - "updated_at": "string"
}Retrieve a specific expert's complete configuration by ID
| id required | string Expert unique identifier |
{- "context": "string",
- "created_at": "string",
- "description": "string",
- "file_context": [
- {
- "property1": "string",
- "property2": "string"
}
], - "id": "string",
- "name": "string",
- "tools": [
- {
- "function": {
- "description": "string",
- "name": "string",
- "parameters": {
- "property1": null,
- "property2": null
}, - "strict": true
}, - "type": "string"
}
], - "updated_at": "string"
}Modify an existing expert's configuration by ID
| id required | string Expert unique identifier |
Updated expert configuration
| context | string |
| description | string |
Array of objects | |
| name | string |
Array of objects (model.ExpertTool) |
{- "context": "string",
- "description": "string",
- "file_context": [
- {
- "property1": "string",
- "property2": "string"
}
], - "name": "string",
- "tools": [
- {
- "function": {
- "description": "string",
- "name": "string",
- "parameters": {
- "property1": null,
- "property2": null
}, - "strict": true
}, - "type": "string"
}
]
}{- "context": "string",
- "created_at": "string",
- "description": "string",
- "file_context": [
- {
- "property1": "string",
- "property2": "string"
}
], - "id": "string",
- "name": "string",
- "tools": [
- {
- "function": {
- "description": "string",
- "name": "string",
- "parameters": {
- "property1": null,
- "property2": null
}, - "strict": true
}, - "type": "string"
}
], - "updated_at": "string"
}Retrieve paginated inference logs with various filtering options
| start_date | string Start date (format: 2006-01-02T15:04:05Z07:00) |
| end_date | string End date (format: 2006-01-02T15:04:05Z07:00) |
| user | string User ID filter |
| api_key | string API key filter |
| model | string Model name filter |
| status | string Status filter (success, error) |
| type | string Request type filter |
| tag | string Tag filter |
| correlation_id | string Correlation ID filter |
| page | integer Page number (default: 1) |
| page_size | integer Page size (default: 20) |
{- "data": [
- {
- "_id": "string",
- "api": "string",
- "correlation_id": "string",
- "created_at": "string",
- "error_message": "string",
- "finished_at": "string",
- "id": "string",
- "input_tokens": 0,
- "latency_ms": 0,
- "messages": [
- {
- "content": "string",
- "created_at": "string",
- "function": {
- "function": {
- "arguments": "string",
- "name": "string"
}, - "id": "string",
- "index": 0,
- "type": "string"
}, - "inference_log_id": "string",
- "name": "string",
- "role": "string",
- "tool_calls": [
- {
- "function": {
- "arguments": "string",
- "name": "string"
}, - "id": "string",
- "index": 0,
- "type": "string"
}
]
}
], - "metadata": {
- "property1": null,
- "property2": null
}, - "model": "string",
- "position": 0,
- "response_log": {
- "answer": {
- "content": "string",
- "input_tokens": 0,
- "output_tokens": 0,
- "reasoning_content": "string",
- "time": 0,
- "tool_calls": [
- {
- "function": {
- "arguments": "string",
- "name": "string"
}, - "id": "string",
- "index": 0,
- "type": "string"
}
]
}, - "guard": {
- "category": "string",
- "content": "string",
- "input_tokens": 0,
- "output_tokens": 0,
- "reasoning_content": "string",
- "time": 0
}, - "router": {
- "content": "string",
- "expert": "string",
- "input_tokens": 0,
- "output_tokens": 0,
- "reasoning_content": "string",
- "time": 0
}
}, - "status": "string",
- "stream": true,
- "tags": [
- "string"
], - "total_tokens": 0,
- "type": "string",
- "user": "string"
}
], - "page": 0,
- "page_size": 0
}Retrieve aggregated statistics for inference logs within a specified time period
| start_date | string Start date (format: 2006-01-02T15:04:05Z07:00) |
| end_date | string End date (format: 2006-01-02T15:04:05Z07:00) |
| user | string User ID filter |
| api_key | string API key filter |
| model | string Model name filter |
| type | string Request type filter |
| correlation_id | string Correlation ID filter |
{- "avg_latency_ms": 0,
- "input_tokens": 0,
- "model_usage": {
- "property1": 0,
- "property2": 0
}, - "output_tokens": 0,
- "period_end_date": "string",
- "period_start_date": "string",
- "success_rate": 0,
- "total_calls": 0,
- "total_tokens": 0
}Create a new Insight conversation
Insight creation request
| actions | Array of strings |
| client | string |
| echo | boolean |
| max_tokens | integer |
| model | string |
| temperature | number |
| top_p | number |
{- "actions": [
- "string"
], - "client": "string",
- "echo": true,
- "max_tokens": 0,
- "model": "string",
- "temperature": 0,
- "top_p": 0
}{- "actions": "string",
- "argument": "string",
- "argument_content": "string",
- "argument_thinking": "string",
- "best_channel": "string",
- "best_time": "string",
- "elapsed_time_in_seconds": 0,
- "error": "string",
- "finish_reason": "string",
- "id": "string",
- "insight": "string",
- "thinking": "string",
- "timeliness": "string",
- "type": "string",
- "usage": {
- "completion_tokens": 0,
- "prompt_tokens": 0,
- "total_tokens": 0
}
}Get a paginated list of all personas
| pageSize | integer Maximum number of personas to return (default: 50) |
| page | integer Number of personas to skip (default: 0) |
[- {
- "data": [
- {
- "birthdate": "string",
- "created_at": "string",
- "data": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "name": "string",
- "notes": "string",
- "updated_at": "string"
}
], - "page": 0,
- "page_size": 0
}
]Create a new persona with provided data
Persona data
| birthdate | string |
object | |
| name | string |
| notes | string |
{- "birthdate": "string",
- "data": {
- "property1": null,
- "property2": null
}, - "name": "string",
- "notes": "string"
}{- "birthdate": "string",
- "created_at": "string",
- "data": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "name": "string",
- "notes": "string",
- "updated_at": "string"
}Retrieve a specific persona by ID
| id required | string Persona unique identifier |
{- "birthdate": "string",
- "created_at": "string",
- "data": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "name": "string",
- "notes": "string",
- "updated_at": "string"
}Modify an existing persona by ID
| id required | string Persona unique identifier |
Updated persona data
| birthdate | string |
object | |
| name | string |
| notes | string |
{- "birthdate": "string",
- "data": {
- "property1": null,
- "property2": null
}, - "name": "string",
- "notes": "string"
}{- "birthdate": "string",
- "created_at": "string",
- "data": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "name": "string",
- "notes": "string",
- "updated_at": "string"
}Create a persona completion based on prompt and existing data
Completion request with prompt and context
object | |
Array of objects | |
| prompt | string |
{- "current_persona": {
- "property1": null,
- "property2": null
}, - "history": [
- {
- "property1": null,
- "property2": null
}
], - "prompt": "string"
}{ }Process files to extract and create personas
| files required | string <binary> Files containing persona data |
{- "conflict_personas": 0,
- "message": "string",
- "status": "string",
- "total": 0,
- "upload_token": "string"
}Finalize a pending persona upload with conflict resolution strategy
| upload_token required | string Upload token from previous upload response |
Conflict resolution strategy
| conflict_resolution | string "overwrite", "create", or "skip" |
{- "conflict_resolution": "string"
}{- "conflicts_resolved": 0,
- "message": "string",
- "status": "string",
- "total_uploaded": 0
}