{"id":14064732,"url":"https://github.com/egeucak/api-doc-gpt","last_synced_at":"2025-09-14T03:33:54.965Z","repository":{"id":187216259,"uuid":"609666398","full_name":"egeucak/api-doc-gpt","owner":"egeucak","description":"ChatGPT for Openapi","archived":false,"fork":false,"pushed_at":"2023-03-27T15:02:29.000Z","size":322,"stargazers_count":46,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-26T22:05:02.801Z","etag":null,"topics":["chatgpt-api","fastapi","gpt-35-turbo","gpt-4","openai","openapi","openapi3","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egeucak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-04T21:34:21.000Z","updated_at":"2025-01-30T14:40:14.000Z","dependencies_parsed_at":"2023-08-09T12:44:32.926Z","dependency_job_id":"4601a6a4-c3c7-44e1-a887-00fcf8f7825f","html_url":"https://github.com/egeucak/api-doc-gpt","commit_stats":null,"previous_names":["egeucak/api-doc-gpt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/egeucak/api-doc-gpt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeucak%2Fapi-doc-gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeucak%2Fapi-doc-gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeucak%2Fapi-doc-gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeucak%2Fapi-doc-gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egeucak","download_url":"https://codeload.github.com/egeucak/api-doc-gpt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeucak%2Fapi-doc-gpt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275058265,"owners_count":25398169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt-api","fastapi","gpt-35-turbo","gpt-4","openai","openapi","openapi3","python"],"created_at":"2024-08-13T07:04:02.668Z","updated_at":"2025-09-14T03:33:54.932Z","avatar_url":"https://github.com/egeucak.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# API Doc GPT\n\nThis is an AI tool that helps you discover your API documentation. It is based on the [GPT-3.5](https://openai.com/blog/better-language-models/) language model from OpenAI.\nYou can use this with either directly connecting to a FastApi app or by passing in an `openapi.json` file.\n\n## Setup\n\nInstall the dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n## How to use with FastApi\n\n1. Run your backend app\n\n```bash\nuvicorn main:app --reload\n```\n\n2. Run the script\n\n```bash\npython api_master.py --openai-key \u003cyour-openai-key\u003e --target \u003cyour-fastapi-app\u003e --base-url \u003cyour-base-url\u003e\n```\n\n## How to use with openapi.json\n\n```bash\npython api_master.py --openai-key \u003cyour-openai-key\u003e --openapi-json \u003copenapi-json\u003e --base-url \u003cyour-base-url\u003e\n```\n\n## Running example\n\n```bash\npython api_master.py --openai-key=\u003cyour-openai-key\u003e --openapi-json=./example/openapi.json --base-url=\"https://petstore3.swagger.io/api/v3\"\n```\n\nEnjoy interacting with your API documentation\n![showcase](./showcase.png)\n\n# With GPT-4\n\nThis also works with GPT-4. You just need to pass parameter `--model-name=gpt-4` while running the script.\n\n## How it works\n\nThis works by creating open api documentation from your fastapi app and then using the GPT-3.5 language model to analyze documentation for your API.\n\n```mermaid\nsequenceDiagram\n    User--\u003e\u003e+Processor: Give me a list of items. I only need 5 of them\n    Processor--\u003e\u003e+AI: PROMPT: Give me a list of items. I only need 5 of them\n    AI--\u003e\u003e+Processor: CMD: GET /items?filter=5\n    Processor--\u003e\u003e+AI: CMD_RESP: [{\"name\": \"cucumber\"}, {\"name\": \"celery\"}...]\n    AI--\u003e\u003e+Processor: OUT: Items are cucumber, celery...\n    Processor--\u003e\u003e+User: Items are cucumber, celery...\n```\n\nThis also supports react. More detail can be found at: https://arxiv.org/abs/2210.03629\n\n## Constraints\n\n- Token size\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegeucak%2Fapi-doc-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegeucak%2Fapi-doc-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegeucak%2Fapi-doc-gpt/lists"}