API Endpoints

The GeoGPT frontend communicates with a FastAPI backend. Below are the primary endpoints used for chat and data management.

Post

/api/chat

Sends a message to the AI assistant along with the current file context and conversation history.

{ "message": "Show me the histogram", "api_key": "optional_key", "file_id": "current_file_id", "history": [ { "role": "user", "content": "..." }, { "role": "assistant", "content": "..." } ] }
Post

/api/upload

Uploads a spatial file. Returns a unique file_id, metadata, and a summary of the data.

Content-Type: multipart/form-data

Get

/api/stats

Retrieves current usage statistics and token counts for the session.