{ "opencollection": "1.0.0", "info": { "name": "TiDB Cloud API Keys Chat2Data API", "version": "v1beta1" }, "items": [ { "info": { "name": "Chat2Data", "type": "folder" }, "items": [ { "info": { "name": "Generate and execute SQL from natural language", "type": "http" }, "http": { "method": "POST", "url": "https://dedicated.tidbapi.com/v1beta1/v3/chat2data", "body": { "type": "json", "data": "{}" } }, "docs": "Translates a natural language question into a SQL statement and executes it against the specified TiDB Cloud cluster and database. The AI model uses the data summary to understand schema context. Supports two generation modes: direct for simple queries, and auto_breakdown for complex questions that benefit from decomposed multi-step query plans." }, { "info": { "name": "Suggest questions for a database", "type": "http" }, "http": { "method": "POST", "url": "https://dedicated.tidbapi.com/v1beta1/v3/suggestQuestions", "body": { "type": "json", "data": "{}" } }, "docs": "Returns a list of suggested natural language questions that are relevant and answerable given the schema of the specified database. Use this endpoint to populate question suggestion UI in data exploration tools." }, { "info": { "name": "Generate and execute SQL from natural language (v2)", "type": "http" }, "http": { "method": "POST", "url": "https://dedicated.tidbapi.com/v1beta1/v2/chat2data", "body": { "type": "json", "data": "{}" } }, "docs": "Translates a natural language question into SQL and executes it using the v2 Chat2Query API. This is an asynchronous operation that returns a job ID. Poll the /v2/jobs/{job_id} endpoint to retrieve results. The v3 endpoint is recommended for new integrations as it returns results synchronously and supports more features." }, { "info": { "name": "Get job status", "type": "http" }, "http": { "method": "GET", "url": "https://dedicated.tidbapi.com/v1beta1/v2/jobs/:job_id", "params": [ { "name": "job_id", "value": "", "type": "path", "description": "The unique identifier of the Chat2Query job." } ] }, "docs": "Returns the current status and result of an asynchronous Chat2Query v2 job. Poll this endpoint after calling the v2 chat2data endpoint until the job status is DONE or FAILED. The query results are included in the response once the job is complete." } ] } ], "bundled": true }