Keymate: Save, Search, Browse with AI Memory · Acciones GPT
Keymate.AI Custom GPT API
API for Keymate.AI Custom GPT that provides memory management and content retrieval capabilities through dedicated endpoints. Key Features: - Memory Management: Save and retrieve information - Content Retrieval: Retrieve content from sources and collections using semantic URLs - Conversation Context: Maintain context across interactions - Browser Extension Integration: Works seamlessly with the Keymate.AI browser extension - Library Management: Access and organize saved content in the platform's library section Commands: - /save: Save information to your memory (requires authentication) - /retrieve: Retrieve content from sources or collections using semantic URLs - /list: List all sources in a collection using collection URL - /help: Get command help
POST /api/custom_gpt/retrieveRetrieve content from a source or collectionRetrieves content from source or collection URLs. No authentication required. Supports: https://app.keymate.ai/source/ID or https://app.keymate.ai/collection/name_id Optional query parameter filters content by relevance.
POST /api/custom_gpt/listList all sources in a collectionLists all sources in a collection using the collection URL. This endpoint does not require authentication. URL format: https://app.keymate.ai/collection/{collection_name}_{collection_id}
POST /api/custom_gpt/saveSave content to memorySaves content to the user's memory. This endpoint requires authentication. The saved content can later be retrieved using the /retrieve endpoint.
GET /api/custom_gpt/helpGet command help informationReturns information about available commands and their usage. If a specific command is provided, returns detailed help for that command.
Esquema original API
{
"openapi": "3.1.0",
"info": {
"title": "Keymate.AI Custom GPT API",
"description": "API for Keymate.AI Custom GPT that provides memory management and content retrieval \ncapabilities through dedicated endpoints.\n\nKey Features:\n- Memory Management: Save and retrieve information\n- Content Retrieval: Retrieve content from sources and collections using semantic URLs\n- Conversation Context: Maintain context across interactions\n- Browser Extension Integration: Works seamlessly with the Keymate.AI browser extension\n- Library Management: Access and organize saved content in the platform's library section\n\nCommands:\n- /save: Save information to your memory (requires authentication)\n- /retrieve: Retrieve content from sources or collections using semantic URLs\n- /list: List all sources in a collection using collection URL\n- /help: Get command help\n",
"version": "1.0.0"
},
"servers": [
{
"url": "https://dialogue-engine.keymate.ai",
"description": "Dynamic server based on request hostname"
}
],
"security": [
{
"BearerAuth": []
}
],
"components": {
"schemas": {
"Message": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string",
"enum": [
"system",
"user",
"assistant"
],
"description": "The role of the message sender"
},
"content": {
"type": "string",
"description": "The message content"
}
}
},
"Action": {
"type": "object",
"required": [
"action",
"parameters",
"priority"
],
"properties": {
"action": {
"type": "string",
"enum": [
"retrieve",
"save",
"list"
],
"description": "The type of action to perform"
},
"parameters": {
"type": "object",
"additionalProperties": true,
"description": "Parameters specific to the action"
},
"priority": {
"type": "integer",
"description": "Order in which actions should be processed (lower numbers first)",
"minimum": 1
}
}
},
"CommandResult": {
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The main result of the command"
},
"next_actions": {
"type": "array",
"description": "Optional follow-up actions to be processed",
"items": {
"$ref": "#/components/schemas/Action"
}
}
}
},
"Error": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"error"
]
},
"message": {
"type": "string"
},
"error": {
"type": "string"
}
}
},
"CommandResponse": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"success",
"error"
]
},
"message": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/CommandResult"
},
"error": {
"type": "string"
}
}
},
"CommandHelp": {
"type": "object",
"properties": {
"command": {
"type": "string"
},
"description": {
"type": "string"
},
"usage": {
"type": "string"
},
"example": {
"type": "string"
}
}
},
"RetrieveRequest": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "URL to retrieve content from (e.g., 'https://app.keymate.ai/source/298742-23482' or 'https://app.keymate.ai/collection/name_id')"
},
"query": {
"type": "string",
"description": "Optional search query to filter content"
},
"user_id": {
"type": "string",
"description": "Optional user identifier"
},
"subscription_id": {
"type": "string",
"description": "Optional subscription identifier"
}
}
},
"ListSourcesRequest": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "URL of the collection to list sources from (e.g., 'https://app.keymate.ai/collection/name_id')"
},
"user_id": {
"type": "string",
"description": "Optional user identifier"
},
"subscription_id": {
"type": "string",
"description": "Optional subscription identifier"
}
}
},
"SaveRequest": {
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"description": "Content to save to memory"
},
"user_id": {
"type": "string",
"description": "Optional user identifier"
},
"subscription_id": {
"type": "string",
"description": "Optional subscription identifier"
}
}
}
},
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer"
}
}
},
"paths": {
"/api/custom_gpt/retrieve": {
"post": {
"summary": "Retrieve content from a source or collection",
"description": "Retrieves content from source or collection URLs. No authentication required.\nSupports: https://app.keymate.ai/source/ID or https://app.keymate.ai/collection/name_id\nOptional query parameter filters content by relevance.\n",
"operationId": "retrieveContent",
"x-openai-isConsequential": false,
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RetrieveRequest"
}
}
}
},
"responses": {
"200": {
"description": "Content retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CommandResponse"
},
"examples": {
"source_retrieve": {
"value": {
"status": "success",
"message": "Retrieved content from source: 298742-23482 matching query: 'capital of France'",
"data": {
"result": {
"documents": [
{
"title": "Memory: The capital of France...",
"uuid": "298742-23482",
"semantic_url": "https://app.keymate.ai/source/298742-23482"
}
],
"context": "The capital of France is Paris...",
"total_count": 1,
"query": "capital of France",
"content_shown": true
}
}
}
},
"collection_retrieve": {
"value": {
"status": "success",
"message": "Retrieved content from collection: Travel Notes (ID: collection-123)",
"data": {
"result": {
"documents": [
{
"title": "Memory: Flight details for Paris trip...",
"uuid": "298742-23482",
"semantic_url": "https://app.keymate.ai/source/298742-23482"
}
],
"context": "My flight to Paris is on June 15th...",
"total_count": 1,
"collections_searched": [
"collection-123"
],
"query": "Paris trip",
"content_shown": true
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid URL format",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/api/custom_gpt/list": {
"post": {
"summary": "List all sources in a collection",
"description": "Lists all sources in a collection using the collection URL. This endpoint does not require authentication.\n\nURL format: https://app.keymate.ai/collection/{collection_name}_{collection_id}\n",
"operationId": "listSources",
"x-openai-isConsequential": false,
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListSourcesRequest"
}
}
}
},
"responses": {
"200": {
"description": "Sources listed successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CommandResponse"
},
"example": {
"status": "success",
"message": "Retrieved 12 sources from collection: Travel Notes (ID: collection-123)",
"data": {
"result": {
"sources": [
{
"uuid": "298742-23482",
"title": "Memory: Flight details for Paris trip...",
"created_at": "2024-04-14T14:22:10Z",
"url": "https://app.keymate.ai/source/298742-23482"
}
],
"collection_name": "Travel Notes",
"collection_id": "collection-123",
"total_count": 12
}
}
}
}
}
},
"400": {
"description": "Invalid URL format",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/api/custom_gpt/save": {
"post": {
"summary": "Save content to memory",
"description": "Saves content to the user's memory. This endpoint requires authentication.\n\nThe saved content can later be retrieved using the /retrieve endpoint.\n",
"operationId": "saveContent",
"x-openai-isConsequential": false,
"security": [
{
"BearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SaveRequest"
}
}
}
},
"responses": {
"200": {
"description": "Content saved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CommandResponse"
},
"example": {
"status": "success",
"message": "Information has been saved successfully!",
"data": {
"result": {
"saved": "The capital of France is Paris",
"doc_uuid": "1234-5678-90ab-cdef",
"chunk_count": 1,
"thread_id": "9876-5432-21fe-dcba"
}
}
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/api/custom_gpt/help": {
"get": {
"summary": "Get command help information",
"description": "Returns information about available commands and their usage.\nIf a specific command is provided, returns detailed help for that command.\n",
"operationId": "getHelp",
"x-openai-isConsequential": false,
"responses": {
"200": {
"description": "Help information retrieved successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"commands": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CommandHelp"
}
}
}
},
"example": {
"commands": [
{
"command": "/save",
"description": "Save information to your memory",
"usage": "/save <information to save>",
"example": "/save The capital of France is Paris"
},
{
"command": "/retrieve",
"description": "Retrieve content from sources or collections using semantic URLs",
"usage": "/retrieve <semantic_url> [query]",
"example": "/retrieve https://app.keymate.ai/source/298742-23482 capital of France"
},
{
"command": "/list",
"description": "List all sources in a collection",
"usage": "/list <collection_semantic_url>",
"example": "/list https://app.keymate.ai/collection/Travel_Notes_collection-123"
},
{
"command": "/help",
"description": "Show this help message",
"usage": "/help [command]",
"example": "/help save"
}
]
}
}
}
}
}
}
}
}
}