Create a new endpoint that allows users to query your datasets and models.
Endpoints are the main interface for users to interact with your RAG system. You can configure them to return raw dataset results, model-generated summaries, or both.
Authentication
Requires tenant authentication via SyftBox token.
Request body
Name of the endpoint. This will be displayed to users in the marketplace.
Unique URL-friendly identifier for the endpoint. Must be:
At least 3 characters long
At most 64 characters long
Lowercase letters, numbers, and hyphens only
No leading, trailing, or consecutive hyphens
Markdown-formatted description of the endpoint. Supports full markdown syntax for rich documentation.
Brief plain-text summary of what the endpoint does.
UUID of the dataset to link to this endpoint. When set, the endpoint will search this dataset for relevant documents.
UUID of the model to link to this endpoint. When set, the endpoint will use this model to generate responses.
Type of response to return. Options:
raw - Only return dataset search results
summary - Only return model-generated response
both - Return both search results and model response
Whether the endpoint is published. Published endpoints are visible in the marketplace.
Comma-separated tags for categorizing the endpoint (e.g., “legal,qa,documents”).
Response
Unique identifier for the created endpoint.
URL-friendly slug (automatically converted to lowercase).
Type of response (raw/summary/both).
Whether the endpoint is published.
UUID of the linked model, if any.
UUID of the linked dataset, if any.
ISO 8601 timestamp of when the endpoint was created.
ISO 8601 timestamp of when the endpoint was last updated.
curl --request POST \
--url http://localhost:8080/api/v1/endpoints/ \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "Legal Q&A Endpoint",
"slug": "legal-qa",
"description": "# Legal Q&A\\nAnswers questions about legal documents",
"summary": "Legal document Q&A system",
"dataset_id": "123e4567-e89b-12d3-a456-426614174000",
"model_id": "223e4567-e89b-12d3-a456-426614174000",
"response_type": "both",
"published": true,
"tags": "legal,qa,documents"
}'
201
400 Bad Request
409 Conflict
{
"id" : "550e8400-e29b-41d4-a716-446655440000" ,
"name" : "Legal Q&A Endpoint" ,
"slug" : "legal-qa" ,
"description" : "# Legal Q&A \n Answers questions about legal documents" ,
"summary" : "Legal document Q&A system" ,
"response_type" : "both" ,
"published" : true ,
"tags" : "legal,qa,documents" ,
"model_id" : "223e4567-e89b-12d3-a456-426614174000" ,
"dataset_id" : "123e4567-e89b-12d3-a456-426614174000" ,
"created_at" : "2024-03-01T12:00:00Z" ,
"updated_at" : "2024-03-01T12:00:00Z"
}