Skip to main content
POST
/
api
/
v1
/
endpoints
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"
  }'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Legal Q&A Endpoint",
  "slug": "legal-qa",
  "description": "# Legal Q&A\nAnswers 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"
}
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
string
required
Name of the endpoint. This will be displayed to users in the marketplace.
slug
string
required
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
description
string
default:""
Markdown-formatted description of the endpoint. Supports full markdown syntax for rich documentation.
summary
string
default:""
Brief plain-text summary of what the endpoint does.
dataset_id
string
default:"null"
UUID of the dataset to link to this endpoint. When set, the endpoint will search this dataset for relevant documents.
model_id
string
default:"null"
UUID of the model to link to this endpoint. When set, the endpoint will use this model to generate responses.
response_type
string
default:"both"
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
published
boolean
default:"false"
Whether the endpoint is published. Published endpoints are visible in the marketplace.
tags
string
default:""
Comma-separated tags for categorizing the endpoint (e.g., “legal,qa,documents”).

Response

id
string
required
Unique identifier for the created endpoint.
name
string
required
Name of the endpoint.
slug
string
required
URL-friendly slug (automatically converted to lowercase).
description
string
required
Markdown description.
summary
string
required
Brief summary.
response_type
string
required
Type of response (raw/summary/both).
published
boolean
required
Whether the endpoint is published.
tags
string
required
Comma-separated tags.
model_id
string
UUID of the linked model, if any.
dataset_id
string
UUID of the linked dataset, if any.
created_at
string
required
ISO 8601 timestamp of when the endpoint was created.
updated_at
string
required
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"
  }'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Legal Q&A Endpoint",
  "slug": "legal-qa",
  "description": "# Legal Q&A\nAnswers 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"
}

Build docs developers (and LLMs) love