Request Format
Learn how to structure request payloads for the Kodesage Chat API like field definitions, data types and sample setups.
Headers
Content-Type: application/json
Authorization: Bearer YOUR API_TOKENRequest body
{
    "messages": [
        {
            "role": "user",
            "content": "Your question here"
        }
    ]
}Message roles
- user - Messages from the end user 
- assistant - Previous responses from the AI (for conversation history) 
Multi-turn Conversations
To maintain conversation context, include the full conversation history:
{
    "messages": [
        {
            "role": "user",
            "content": "How does authentication work in this project?"
        },
        {
            "role": "assistant",
            "content": "The project uses Spring Security with..."
        },
        {
            "role": "user",
            "content": "Can you show me the code for that?"
        }
    ]
}Last updated

