Skip to content

Your first API with the AI agent ​

In a few minutes, the AI agent builds a complete API from a simple description: the data model, the endpoints and the data source.

1. Describe what you need ​

  1. In the left menu, click AI Agent · Home.

  2. Under the "What do you want to create?" heading, describe your API in one or two sentences in the input field. For example:

    An inventory API with products, warehouses and low-stock alerts.

  3. Click Generate, or press Enter.

To go faster

  • Voice input: if your browser supports it, click Voice, dictate what you need, then click Stop.
  • Existing contract: click Import OpenAPI and choose a JSON or YAML file (OpenAPI 3.x or Swagger 2.0). Check the preview (API name, version, specification, number of endpoints), then click Generate with AI: the agent turns the contract into an API.

2. Validate the architecture proposal ​

Before creating anything, the agent shows an Architecture Proposal: the resources, their fields and the planned endpoints. It asks "Does this plan suit you?".

  • Adjust: the input field is pre-filled with "Je voudrais modifier le plan : " ("I'd like to change the plan:"). Complete it with what should change ("add a supplier field to products", "no delete endpoint needed"…) and send it. The agent proposes a new plan.
  • Validate and generate: the agent builds the API.

3. Explore the result ​

Once the API is created, the agent shows cards:

CardContent
Data SourceThe data source used: name, type, provider and database
The modelThe model's name, its fields (FIELD) and their types (TYPE)
CREATED SUCCESSFULLYYour API's name and the endpoints created, with their method and path

From these cards, you can:

  • Access project: open the created project to view or edit it;
  • Open in editor: show the API's contract in a panel on the right, with the OpenAPI and Schema tabs. From this panel, Export OpenAPI contract downloads it as JSON or YAML.

4. Test an endpoint ​

In the OpenAPI tab of the panel opened with Open in editor:

  1. Click an endpoint to expand it.
  2. Fill in its Parameters and, if it expects one, the Request body (JSON).
  3. Click Execute. The API's response is displayed.

5. Evolve the API ​

Keep the conversation going to change the API, for example:

  • "Add a supplier field to the Product model."
  • "Add an endpoint that lists products with a stock below 10."

To target a specific element, attach it to your message:

  • click an endpoint or a field in the result cards;
  • drag an endpoint from the editor panel into the input field;
  • double-click a word in one of the agent's replies.

Manage your conversations ​

The Conversations panel groups your chats into RECENT, THIS WEEK and OLDER. You can rename, export or delete a conversation, and start a New conversation.

Conversations are stored in your browser

The conversation history is stored in your browser. It does not appear on another computer, and it is lost if you clear your browser data. The APIs you created stay in your projects.

What's next? ​

  • Explore your API on the Projects page: endpoints, releases, documentation.
  • Prefer building step by step? Follow Your first API with forms.

Grizzly API · CodeOnce Software