Skip to main content

Inference API (1.0)

Download OpenAPI specification:Download

This is the API documentation for the Inference backend.

Authentication

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.

action groups

Get all action groups

Retrieve a list of action groups with pagination

Authorizations:
ApiKeyAuth
query Parameters
pageSize
integer
Default: 10

pageSize

page
integer
Default: 0

page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": 0,
  • "page_size": 0
}

Create action group

Create a new action group

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Action Group creation request

description
required
string
name
required
string

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "created_at": "string",
  • "description": "string",
  • "id": "string",
  • "name": "string",
  • "updated_at": "string"
}

Delete action group

Delete an action group by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Action group ID

Responses

Response samples

Content type
application/json
{
  • "id": "string"
}

Get action group

Retrieve an action group by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Action Group ID

Responses

Response samples

Content type
application/json
{
  • "created_at": "string",
  • "description": "string",
  • "id": "string",
  • "name": "string",
  • "updated_at": "string"
}

Update action group

Update an action group by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Action group ID

Request Body schema: application/json
required

Action group update request

description
string
name
string

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "created_at": "string",
  • "description": "string",
  • "id": "string",
  • "name": "string",
  • "updated_at": "string"
}

actions

Get all actions

Retrieve a list of actions with pagination

Authorizations:
ApiKeyAuth
query Parameters
pageSize
integer
Default: 10

pageSize

page
integer
Default: 0

page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": 0,
  • "page_size": 0
}

Create action

Create a new action

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

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

Responses

Request samples

Content type
application/json
{
  • "custom_insights": "string",
  • "description": "string",
  • "end_date": "string",
  • "name": "string",
  • "priority": "very_low",
  • "start_date": "string",
  • "status": "archived",
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "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"
}

Delete action

Delete an action by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Action ID

Responses

Response samples

Content type
application/json
{
  • "id": "string"
}

Get action

Retrieve an action by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Action ID

Responses

Response samples

Content type
application/json
{
  • "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 action

Update an action by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Action ID

Request Body schema: application/json
required

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

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "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"
}

api-keys

Create API key

Create a new API key

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

API key creation request

allowed_ips
Array of strings
created_at
string
created_by
string
description
string
email
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

Responses

Request samples

Content type
application/json
{
  • "allowed_ips": [
    ],
  • "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": [
    ],
  • "user_id": "string"
}

Response samples

Content type
application/json
{
  • "allowed_ips": [
    ],
  • "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": [
    ],
  • "user_id": "string"
}

Delete API key

Delete an API key by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

API key ID

Responses

Response samples

Content type
application/json
{
  • "id": "string"
}

Get API key

Retrieve an API key by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

API key ID

Responses

Response samples

Content type
application/json
{
  • "allowed_ips": [
    ],
  • "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": [
    ],
  • "user_id": "string"
}

chats

List chats

Retrieve a paginated list of chat conversations, optionally filtered by name

Authorizations:
ApiKeyAuth
query Parameters
page
integer

Page number (default 1)

page_size
integer

Number of items per page (default 10)

name
string

Filter chats by name

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": 0,
  • "page_size": 0
}

Create chat completion

Generate a chat completion based on provided messages and parameters

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

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

Responses

Request samples

Content type
application/json
{
  • "api_key": "string",
  • "echo": true,
  • "expert_ids": [
    ],
  • "guard_enabled": true,
  • "guard_reasoning_enabled": true,
  • "id": "string",
  • "max_tokens": 0,
  • "messages": [
    ],
  • "metadata": {
    },
  • "model": "string",
  • "name": "string",
  • "router_enabled": true,
  • "router_reasoning_enabled": true,
  • "stream": true,
  • "tags": [
    ],
  • "temperature": 0,
  • "top_p": 0,
  • "type": "string",
  • "user": "string"
}

Response samples

Content type
application/json
{
  • "choices": [
    ],
  • "created_at": "string",
  • "guard": {
    },
  • "id": "string",
  • "model": "string",
  • "object": "string",
  • "router": {
    },
  • "usage": {
    }
}

Delete chat

Delete an chat by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Chat ID

Responses

Response samples

Content type
application/json
{
  • "id": "string"
}

Get chat history

Retrieve a chat conversation by its unique identifier

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Chat identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "messages": [
    ],
  • "name": "string"
}

Update chat

Update an chat by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Chat ID

Request Body schema: application/json
required

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

Responses

Request samples

Content type
application/json
{
  • "guard_enabled": true,
  • "last_response": {
    },
  • "max_tokens": 0,
  • "messages": [
    ],
  • "model": "string",
  • "name": "string",
  • "router_enabled": true,
  • "temperature": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "messages": [
    ],
  • "name": "string"
}

Get chat history window

Retrieve a chat with a window of the conversation

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Chat identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "messages": [
    ],
  • "name": "string"
}

experts

List all experts

Get a comprehensive list of all available experts

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": 0,
  • "page_size": 0
}

Create expert

Create a new expert with custom configuration and prompt templates

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Expert configuration data

context
string
description
required
string
Array of objects
name
required
string
Array of objects (model.ExpertTool)

Responses

Request samples

Content type
application/json
{
  • "context": "string",
  • "description": "string",
  • "file_context": [
    ],
  • "name": "string",
  • "tools": [
    ]
}

Response samples

Content type
application/json
{
  • "context": "string",
  • "created_at": "string",
  • "description": "string",
  • "file_context": [
    ],
  • "id": "string",
  • "name": "string",
  • "tools": [
    ],
  • "updated_at": "string"
}

Delete expert

Permanently remove an expert configuration by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Expert unique identifier

Responses

Get expert details

Retrieve a specific expert's complete configuration by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Expert unique identifier

Responses

Response samples

Content type
application/json
{
  • "context": "string",
  • "created_at": "string",
  • "description": "string",
  • "file_context": [
    ],
  • "id": "string",
  • "name": "string",
  • "tools": [
    ],
  • "updated_at": "string"
}

Update expert configuration

Modify an existing expert's configuration by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Expert unique identifier

Request Body schema: application/json
required

Updated expert configuration

context
string
description
string
Array of objects
name
string
Array of objects (model.ExpertTool)

Responses

Request samples

Content type
application/json
{
  • "context": "string",
  • "description": "string",
  • "file_context": [
    ],
  • "name": "string",
  • "tools": [
    ]
}

Response samples

Content type
application/json
{
  • "context": "string",
  • "created_at": "string",
  • "description": "string",
  • "file_context": [
    ],
  • "id": "string",
  • "name": "string",
  • "tools": [
    ],
  • "updated_at": "string"
}

inference-logs

Get inference logs

Retrieve paginated inference logs with various filtering options

Authorizations:
ApiKeyAuth
query Parameters
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)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": 0,
  • "page_size": 0
}

Get inference logs summary

Retrieve aggregated statistics for inference logs within a specified time period

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "avg_latency_ms": 0,
  • "input_tokens": 0,
  • "model_usage": {
    },
  • "output_tokens": 0,
  • "period_end_date": "string",
  • "period_start_date": "string",
  • "success_rate": 0,
  • "total_calls": 0,
  • "total_tokens": 0
}

insights

Create Insight

Create a new Insight conversation

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Insight creation request

actions
Array of strings
client
string
echo
boolean
max_tokens
integer
model
string
temperature
number
top_p
number

Responses

Request samples

Content type
application/json
{
  • "actions": [
    ],
  • "client": "string",
  • "echo": true,
  • "max_tokens": 0,
  • "model": "string",
  • "temperature": 0,
  • "top_p": 0
}

Response samples

Content type
application/json
{
  • "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": {
    }
}

models

List inference models

Retrieve a list of available inference models from the inference server

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": 0,
  • "page_size": 0
}

personas

List personas

Get a paginated list of all personas

Authorizations:
ApiKeyAuth
query Parameters
pageSize
integer

Maximum number of personas to return (default: 50)

page
integer

Number of personas to skip (default: 0)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create persona

Create a new persona with provided data

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Persona data

birthdate
string
object
name
string
notes
string

Responses

Request samples

Content type
application/json
{
  • "birthdate": "string",
  • "data": {
    },
  • "name": "string",
  • "notes": "string"
}

Response samples

Content type
application/json
{
  • "birthdate": "string",
  • "created_at": "string",
  • "data": {
    },
  • "id": "string",
  • "name": "string",
  • "notes": "string",
  • "updated_at": "string"
}

Delete persona

Permanently remove a persona by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Persona unique identifier

Responses

Get persona details

Retrieve a specific persona by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Persona unique identifier

Responses

Response samples

Content type
application/json
{
  • "birthdate": "string",
  • "created_at": "string",
  • "data": {
    },
  • "id": "string",
  • "name": "string",
  • "notes": "string",
  • "updated_at": "string"
}

Update persona

Modify an existing persona by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Persona unique identifier

Request Body schema: application/json
required

Updated persona data

birthdate
string
object
name
string
notes
string

Responses

Request samples

Content type
application/json
{
  • "birthdate": "string",
  • "data": {
    },
  • "name": "string",
  • "notes": "string"
}

Response samples

Content type
application/json
{
  • "birthdate": "string",
  • "created_at": "string",
  • "data": {
    },
  • "id": "string",
  • "name": "string",
  • "notes": "string",
  • "updated_at": "string"
}

Generate persona completion

Create a persona completion based on prompt and existing data

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Completion request with prompt and context

object
Array of objects
prompt
string

Responses

Request samples

Content type
application/json
{
  • "current_persona": {
    },
  • "history": [
    ],
  • "prompt": "string"
}

Response samples

Content type
application/json
{ }

Upload persona files

Process files to extract and create personas

Authorizations:
ApiKeyAuth
Request Body schema: multipart/form-data
required
files
required
string <binary>

Files containing persona data

Responses

Response samples

Content type
application/json
{
  • "conflict_personas": 0,
  • "message": "string",
  • "status": "string",
  • "total": 0,
  • "upload_token": "string"
}

Confirm pending persona upload

Finalize a pending persona upload with conflict resolution strategy

Authorizations:
ApiKeyAuth
path Parameters
upload_token
required
string

Upload token from previous upload response

Request Body schema: application/json
required

Conflict resolution strategy

conflict_resolution
string

"overwrite", "create", or "skip"

Responses

Request samples

Content type
application/json
{
  • "conflict_resolution": "string"
}

Response samples

Content type
application/json
{
  • "conflicts_resolved": 0,
  • "message": "string",
  • "status": "string",
  • "total_uploaded": 0
}