Skip to main content
POST
/
sources
Index Source
curl --request POST \
  --url https://apigcp.trynia.ai/v2/sources \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "repository",
  "repository": "<string>",
  "branch": "<string>",
  "ref": "<string>",
  "url": "<string>",
  "url_patterns": [
    "<string>"
  ],
  "exclude_patterns": [
    "<string>"
  ],
  "project_id": "<string>",
  "max_age": 123,
  "formats": [
    "<string>"
  ],
  "only_main_content": true,
  "limit": 123,
  "max_depth": 123,
  "crawl_entire_domain": true,
  "wait_for": 123,
  "include_screenshot": true,
  "check_llms_txt": true,
  "llms_txt_strategy": "<string>",
  "add_as_global_source": true,
  "is_pdf": true,
  "display_name": "<string>",
  "focus_instructions": "<string>",
  "extract_branding": true,
  "extract_images": true,
  "config": "<string>",
  "folder_name": "<string>",
  "folder_path": "<string>",
  "files": [
    {
      "path": "<string>",
      "content": "<string>"
    }
  ],
  "database": {
    "filename": "<string>",
    "content": "<string>"
  }
}
'
{
  "id": "<string>",
  "type": "repository",
  "identifier": "<string>",
  "display_name": "<string>",
  "status": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "category_id": "<string>",
  "is_global": true,
  "global_source_id": "<string>",
  "global_namespace": "<string>",
  "metadata": {}
}

Body

application/json
type
enum<string>
required
Available options:
repository,
documentation,
research_paper,
huggingface_dataset,
local_folder
repository
string | null
branch
string | null
ref
string | null
url
string | null
url_patterns
string[] | null
exclude_patterns
string[] | null
project_id
string | null
max_age
integer | null
formats
string[] | null
only_main_content
boolean | null
limit
integer | null
max_depth
integer | null
crawl_entire_domain
boolean | null
wait_for
integer | null
include_screenshot
boolean | null
check_llms_txt
boolean | null
llms_txt_strategy
string | null
add_as_global_source
boolean | null
default:true
is_pdf
boolean | null
display_name
string | null
focus_instructions
string | null
extract_branding
boolean | null
extract_images
boolean | null
config
string | null
folder_name
string | null
folder_path
string | null
files
FileItem · object[] | null
database
DatabaseFileItem · object

A database file for upload.

Response

Successful Response

Unified source representation.

id
string
required

Source identifier

type
enum<string>
required

Source type

Available options:
repository,
documentation,
research_paper,
huggingface_dataset,
local_folder
identifier
string | null

Canonical identifier (repo slug, URL, or folder path)

display_name
string | null

Human-readable name

status
string | null

Indexing status

created_at
string | null

Creation timestamp (ISO)

updated_at
string | null

Last update timestamp (ISO)

category_id
string | null

Category assignment

is_global
boolean | null

Whether the source is global/shared

global_source_id
string | null

Global source ID if applicable

global_namespace
string | null

Global namespace if applicable

metadata
Metadata · object

Type-specific metadata