Skip to content
Follow yggy on LinkedInFollow @yggy_tech on X

Chat with Knowledge Graph

POST
/api/v1/projects/{projectId}/chat
curl --request POST \
--url https://api.yggy.tech/api/v1/projects/example/chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "message": "example", "history": [], "options": { "tier": "fast" } }'

Ask questions about your documents using the knowledge graph.

The AI agent will search the graph, find relevant entities and relationships, and synthesize an answer.

Examples of questions you can ask:

  • “Who founded Acme Corp?”
  • “What topics are discussed in my documents?”
  • “How is John Smith related to the AI project?”
  • “What are the main entities mentioned?”
projectId
required
string
>= 1 characters
Media type application/json
object
message
required

Your question about the knowledge graph

string
>= 1 characters
history

Previous conversation messages for context

Array<object>
default:
object
role
required

Message role

string
Allowed values: user assistant
content
required

Message content

string
options
object
tier

Model tier for response quality

string
default: balanced
Allowed values: fast balanced accurate

Chat response

Media type application/json
object
success
required
boolean
data
required
object
response
required

The AI’s answer to your question

string
citations

Documents referenced by graph tools

Array<object>
object
documentId
required

Document that grounded the answer

string
source

Caller-supplied source id when present

string
snippet

Evidence text when the tool returned it

string
toolCalls
Array<object>
object
name
required
string
input
result
usage
object
inputTokens
number
outputTokens
number
totalTokens
number
metadata
required
object
processingTimeMs
required
number
tierApplied
required
string
Allowed values: fast balanced accurate
Example
{
"data": {
"metadata": {
"tierApplied": "fast"
}
}
}

Unauthorized

Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
string
Example
{
"success": false
}

Project access denied

Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
string
Example
{
"success": false
}

Internal server error

Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
string
Example
{
"success": false
}