curl --location 'https://api.matterai.so/v1/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer MATTERAI_API_KEY' \
--data '{
"model": "axon-code",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant"
},
{
"role": "user",
"content": "Hi"
}
],
"stream": true,
"tools": [
{
"type": "function",
"function": {
"name": "codebase_search",
"description": "`codebase_search`: semantic search that finds code by meaning, not exact text",
"parameters": {
"type": "object",
"properties": {
"explanation": {
"type": "string",
"description": "One sentence explanation as to why this tool is being used, and how it contributes to the goal."
},
"query": {
"type": "string",
"description": "A complete question about what you want to understand. Ask as if talking to a colleague: 'How does X work?', 'What happens when Y?', 'Where is Z handled?'"
},
"target_directories": {
"type": "array",
"items": {
"type": "string"
},
"description": "Prefix directory paths to limit search scope (single directory only, no glob patterns)"
},
"search_only_prs": {
"type": "boolean",
"description": "If true, only search pull requests and return no code results."
}
},
"required": [
"explanation",
"query",
"target_directories"
]
}
}
}
],
"tool_choice": "auto",
"max_tokens": 2000,
"reasoning": {
"effort": "none",
"summary": "none"
},
"response_format": {
"type": "text"
},
"temperature": 0.1,
"top_p": 1
}'