Skip to main content

API Endpoint Reference

This document provides the complete endpoint list and quick reference for the GeniSpace API. All endpoints are served under the /api base path (for example https://api.genispace.ai/api/agents).

Agent API

Management Endpoints

MethodEndpointDescription
GET/api/agentsList agents (supports accessibleOnly)
POST/api/agentsCreate a new agent (requires name, model, systemPrompt)
GET/api/agents/{id}Get agent details
PUT/api/agents/{id}Update an agent
DELETE/api/agents/{id}Delete an agent
GET/api/agents/system-agentsList built-in system agents

When creating an agent you may restrict access with accessScope (SPACE or RESTRICTED) and, for RESTRICTED agents, an allowedUserIds[] list. See the Agent API for the full parameter reference.

Execution Endpoints

MethodEndpointDescription
POST/api/agents/{id}/chatMultimodal chat with SSE streaming (GeniSpace-native contents[])
POST/api/agents/{id}/executeStructured agent execution

Session Endpoints

MethodEndpointDescription
POST/api/agents/sessionsCreate a conversation session
GET/api/agents/sessionsList conversation sessions
GET/api/agents/sessions/{sessionId}Get session details
DELETE/api/agents/sessions/{sessionId}Delete a session
GET/api/agents/sessions/{sessionId}/messagesList session messages

Memory Endpoints

MethodEndpointDescription
GET/api/agents/{id}/memoryList agent memory entries
POST/api/agents/{id}/memoryCreate a memory entry
PUT/api/agents/{id}/memory/{memoryId}Update a memory entry
DELETE/api/agents/{id}/memory/{memoryId}Delete a memory entry
POST/api/agents/{id}/memory/searchSearch agent memory
DELETE/api/agents/{id}/memory/clearClear agent memory

MCP Tools

MethodEndpointDescription
GET/api/agents/{id}/mcp/toolsList MCP tools available to the agent

Task API

MethodEndpointDescription
GET/api/tasksList tasks
POST/api/tasksCreate a new task
GET/api/tasks/{id}Get task details
PUT/api/tasks/{id}Update a task
DELETE/api/tasks/{id}Delete a task
POST/api/tasks/{id}/executeExecute a task
GET/api/tasks/{id}/executionsGet task execution history
GET/api/tasks/executions/{executionId}Get an execution's details
GET/api/tasks/runs/{executionId}Get an execution's run status

Dataset API

MethodEndpointDescription
GET/api/datasetsList datasets
POST/api/datasetsCreate a new dataset
GET/api/datasets/{id}Get dataset details
DELETE/api/datasets/{id}Delete a dataset
POST/api/datasets/{id}/data/insertInsert rows
POST/api/datasets/{id}/data/queryQuery rows with filters
POST/api/datasets/{id}/data/updateUpdate rows
POST/api/datasets/{id}/data/deleteDelete rows
POST/api/datasets/{id}/data/searchVector search
POST/api/datasets/{id}/data/full-text-searchFull-text search

API Key Management

MethodEndpointDescription
GET/api/api-keysList API keys
POST/api/api-keysCreate a new API key
GET/api/api-keys/{id}Get API key details
PUT/api/api-keys/{id}Update an API key
POST/api/api-keys/{id}/revokeRevoke an API key
POST/api/api-keys/validateValidate an API key

OpenAI-Compatible Relay

MethodEndpointDescription
GET/models/v1/{path}OpenAI-compatible GET relay
POST/models/v1/{path}OpenAI-compatible POST relay (e.g. /models/v1/chat/completions)