{"id":21457797,"url":"https://github.com/the-swarm-corporation/fluidapi","last_synced_at":"2025-04-22T13:38:50.498Z","repository":{"id":263896087,"uuid":"891727089","full_name":"The-Swarm-Corporation/FluidAPI","owner":"The-Swarm-Corporation","description":"Welcome to **FluidAPI**, a framework that allows you to interact with APIs using **natural language**. No more JSON, headers, or complex formats—simply describe your request in plain English, and FluidAPI will do the rest.","archived":false,"fork":false,"pushed_at":"2025-03-23T12:36:36.000Z","size":2292,"stargazers_count":30,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T08:17:17.313Z","etag":null,"topics":["agents","ai","apis","django","fastapi","flaskapi","graphql","llms","ml","multi-agent","multi-agent-framework","swarms"],"latest_commit_sha":null,"homepage":"https://swarms.xyz/","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/The-Swarm-Corporation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["kyegomez"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2024-11-20T21:07:37.000Z","updated_at":"2025-02-02T22:02:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"71674b86-cb39-4f14-99b8-272352690417","html_url":"https://github.com/The-Swarm-Corporation/FluidAPI","commit_stats":null,"previous_names":["the-swarm-corporation/fluidapi"],"tags_count":0,"template":false,"template_full_name":"kyegomez/Python-Package-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2FFluidAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2FFluidAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2FFluidAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2FFluidAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/The-Swarm-Corporation","download_url":"https://codeload.github.com/The-Swarm-Corporation/FluidAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250249850,"owners_count":21399532,"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","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":["agents","ai","apis","django","fastapi","flaskapi","graphql","llms","ml","multi-agent","multi-agent-framework","swarms"],"created_at":"2024-11-23T06:07:07.944Z","updated_at":"2025-04-22T13:38:50.452Z","avatar_url":"https://github.com/The-Swarm-Corporation.png","language":"Python","funding_links":["https://github.com/sponsors/kyegomez"],"categories":[],"sub_categories":[],"readme":"# FluidAPI: Natural Language API Requests\n\n[![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge\u0026logo=discord\u0026logoColor=white)](https://discord.gg/agora-999382051935506503) [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge\u0026logo=youtube\u0026logoColor=white)](https://www.youtube.com/@kyegomez3242) [![Connect on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/kye-g-38759a207/) [![Follow on X.com](https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge\u0026logo=x\u0026logoColor=white)](https://x.com/kyegomezb)\n\nWelcome to **FluidAPI**, a revolutionary framework that allows you to interact with APIs using **natural language**. No more JSON, headers, or complex formats—simply describe your request in plain English, and FluidAPI will do the rest.\n\nPowered by the **Swarms Framework** and created by [Kye Gomez](https://github.com/kyegomez), FluidAPI redefines how developers interact with APIs.\n\n---\n\n## 🌟 Features\n\n- **Natural Language API Requests**: Just describe your task, and FluidAPI generates and executes the request for you.\n- **Powered by AI Agents**: Built on the robust [Swarms Framework](https://github.com/kyegomez/swarms), enabling dynamic and intelligent API handling.\n- **Effortless Integration**: Replace complex API workflows with simple, human-friendly commands.\n- **Retry and Reliability**: Automatic retries and error handling for seamless performance.\n- **Dynamic Authentication**: Handles token management and injects them automatically.\n\n---\n\n## 🚀 Installation\n\nInstall the `fluid-api-agent` package via pip:\n\n```bash\npip install fluid-api-agent\n```\n\n---\n\n## 🔧 Getting Started\n\n### Simple Example\n\n```python\nfrom fluid_api_agent.main import (\n    fluid_api_request,\n)\n\n# Example 1: Basic API Request\nbasic_request = fluid_api_request(\n    \"Generate an API request to get a random cat fact from https://catfact.ninja/fact\"\n)\n\nprint(basic_request.model_dump_json(indent=4))\n```\n\n### Advanced Example\n```python\nfrom fluid_api_agent.main import (\n    fluid_api_request,\n    batch_fluid_api_request,\n)\n\n# Example 1: Basic API Request\n# Make a simple API request with default parameters\nbasic_request = fluid_api_request(\n    \"Generate an API request to get a random cat fact from https://catfact.ninja/fact\"\n)\nprint(\"\\n=== Basic Request ===\")\nprint(basic_request.model_dump_json(indent=4))\n\n# Example 2: Request with Raw Response\n# Get the raw response without any processing\nraw_request = fluid_api_request(\n    \"Generate an API request to get a random joke from https://official-joke-api.appspot.com/random_joke\",\n    return_raw=True\n)\nprint(\"\\n=== Raw Request ===\") \nprint(raw_request.model_dump_json(indent=4))\n\n# Example 3: Verbose Request\n# Enable detailed logging during request processing\nverbose_request = fluid_api_request(\n    \"Generate an API request to get weather data for New York from OpenWeatherMap\",\n    verbose=True\n)\nprint(\"\\n=== Verbose Request ===\")\nprint(verbose_request.model_dump_json(indent=4))\n\n# Example 4: Request with Custom Documentation\n# Provide API documentation to improve request generation\ndocs = \"\"\"\nAPI Endpoint: https://api.example.com/v1/users\nMethods: GET, POST\nAuthentication: Bearer token required\n\"\"\"\ncustom_doc_request = fluid_api_request(\n    \"Generate a request to get all users\",\n    documentation=docs,\n    verbose=True\n)\nprint(\"\\n=== Request with Documentation ===\")\nprint(custom_doc_request.model_dump_json(indent=4))\n\n# Example 5: Batch Processing\n# Process multiple API requests in sequence\nprint(\"\\n=== Batch Request ===\")\nbatch_results = batch_fluid_api_request(\n    tasks=[\n        \"Generate an API request to get a random dog fact from https://dogapi.dog/api/v2/facts\",\n        \"Generate an API request to get a random quote from https://api.quotable.io/random\",\n        \"Generate an API request to get Bitcoin price from CoinGecko public API\"\n    ],\n    verbose=True\n)\nfor i, result in enumerate(batch_results, 1):\n    print(f\"\\nBatch Result {i}:\")\n    print(result.model_dump_json(indent=4))\n\n```\n\n\n\nFluidAPI will:\n1. Interpret your request.\n2. Generate and execute the appropriate API call.\n3. Return the API's response.\n\n---\n\n### Example\nSee the [example.py](example.py) file for more examples.\n\n---\n\n## ⚙️ Configuration\n\n### Environment Variables\nFluidAPI uses environment variables for sensitive data:\n- `OPENAI_API_KEY`: Your OpenAI API key.\n\nSet these variables in your `.env` file:\n```env\nOPENAI_API_KEY=your-openai-api-key\nWORKSPACE_DIR=\"agent_workspace\"\n\n```\n\n---\n\n## 📦 Advanced Features\n\n### Retry Logic\nFluidAPI includes built-in retry logic to handle transient failures automatically. You can configure retry settings directly in the agent.\n\n### Caching\nFrequent requests are optimized with caching to improve performance.\n\n---\n\n## 🛠 Development\n\n### Clone the Repository\n```bash\ngit clone https://github.com/The-Swarm-Corporation/fluidapi.git\ncd fluidapi\n```\n\n### Install Dependencies\n```bash\npip install -r requirements.txt\n```\n\n---\n\n## 💡 How It Works\n\nFluidAPI leverages the **Swarms Framework** to:\n1. Parse natural language instructions.\n2. Dynamically construct API requests.\n3. Execute requests and handle responses intelligently.\n\nLearn more about the Swarms Framework [here](https://github.com/kyegomez/swarms).\n\n---\n\n# Todo\n- [ ] Add documentation\n- [ ] Add tests\n- [ ] Add examples\n\n----\n\n## 🤝 Contributing\n\nWe welcome contributions! To get started:\n1. Fork the repository.\n2. Create a new branch.\n3. Submit a pull request.\n\n---\n\n## 📝 License\n\nFluidAPI is licensed under the MIT License. See the [LICENSE](https://github.com/The-Swarm-Corporation/fluidapi/blob/main/LICENSE) file for details.\n\n---\n\n## 🌍 Connect with Us\n\n- **Author**: [Kye Gomez](https://github.com/kyegomez)\n- **Project**: [The-Swarm-Corporation/FluidAPI](https://github.com/The-Swarm-Corporation/fluidapi)\n- **Pip Package**: [fluid-api](https://pypi.org/project/fluid-api/)\n\n---\n\n**Transform the way you interact with APIs. With FluidAPI, it's as simple as saying what you want.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-swarm-corporation%2Ffluidapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-swarm-corporation%2Ffluidapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-swarm-corporation%2Ffluidapi/lists"}