GitSeek Code-to-Prompt API helps you extract complete, context-rich code from any repository for use in AI tools. Perfect for getting precise code snippets to analyze with Claude, implement similar features with Cursor, or understand complex architectures.
All API requests require authentication using an API key. You can get your API key from the dashboard after signing up.
X-Api-Key: your_api_key_here
POST /api/code-to-prompt
{
url: string; // Repository URL to analyze (required)
query?: string; // Natural language description of the code you want to extract. If not provided, returns the entire repository content.
}
Example Request
Here's how to extract authentication-related code from a repository:
curl -X POST https://app.gitseek.ai/api/code-to-prompt \
-H 'X-Api-Key: your_api_key_here' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://github.com/username/repo",
"query": "authentication implementation and related code"
}'
{
summary: { // Analysis summary including repository name, number of files analyzed, and token count
repository_name: string;
files_analyzed: number;
estimated_tokens: string;
};
tree: string; // Structured view of the repository's file hierarchy
content: string; // Extracted code content with full context
}
401: Unauthorized Invalid or missing API key
403: Forbidden Insufficient credits
400: Bad Request Invalid request parameters