Settings

Theme

Show HN: Api2ai – create an API agent from any OpenAPI Spec

github.com

23 points by quan 2 years ago · 5 comments · 1 min read

Reader

api2ai parses OpenAPI Spec to generate an agent that can make API calls. For context, I recently need to explore a handful of API suites and thought LLMs can help expedite this process. After some digging, I found OpenAPI Specs are perfect fit for function calling.

Based on a text prompt, api2ai can select the right endpoint and properly parse request params and make api calls. It also handles authentication, currently it supports basic auth, api keys, and bearer token schemes. The tool has helped me explore and see APIs in action without a deep dive into the docs or using postman. It’s open source and hopefully can be useful for you, too.

Please let me know if you have any questions or feedback.

toomuchtodo 2 years ago

Would pair nicely with Magic Loops: https://news.ycombinator.com/item?id=36958731

cosbgn 2 years ago

I'm actually working on something similar, but it's a SAAS rather than a library, https://news.ycombinator.com/item?id=37037555 - The benefit is that you don't need hosting or maintenance.

rattray 2 years ago

How do you handle very large OpenAPI specs? For example, I think stripe's is over a megabyte. What's the summarization strategy?

  • quanOP 2 years ago

    It’s done in two steps: 1. Create an array of every endpoint’s summary text and ask AI to select one based on the user prompt 2. Use function calling with parameters of the selected operation in step 1

byteknight 2 years ago

How might this be different than Langchain open app agent?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection