Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Generate and Test a Small API Service With Error Handling

Overview

Ask Devin to build a small API service in its own environment, install what it needs, call every endpoint, add clear error responses with tests, and open a pull request you review.

Problem or Objective

More in Coding and Code Review

AI Agents and Models

Tools and Integrations

Tools
Devin
Prerequisites
A Devin account connected to your code host.

How It Works

Write a short spec for the service: the endpoints, the request and response shapes, the language and framework, and how each error should look, for example a 400 with a message for bad input and a 404 for a missing record. Start a Devin session with the spec and an empty repository or a new folder in an existing one. Ask Devin to install the packages it needs, write the service, add a test for every endpoint including each error case, start the service and call each endpoint, then show you the test output. Watch its terminal if you want, and step in if it drifts from the spec. Review the pull request yourself, run the tests locally, and merge only when you are satisfied.

Implementation Workflow

Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.

  1. Choose the agentSet up Devin.
  2. Connect the toolsConnect the tools this workflow relies on: Devin.
  3. Check the prerequisitesA Devin account connected to your code host.
  4. Gather your detailsCollect what the prompt asks for: Language and framework, Repository, Endpoints, Error response format.
  5. Run the starter promptPaste the starter prompt below into Devin and adapt it to your case.
  6. Check against the documentationCompare what you get with the documentation at docs.devin.ai before you rely on it.

Practical Starter Prompt: Build and test a small API

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
Build a small [Language and framework] API service in [Repository] with these endpoints: [Endpoints]. Install only the packages you need. For errors, return [Error response format], with 400 for invalid input and 404 for missing records. Write a test for every endpoint, including each error case, then start the service, call each endpoint, and show me the test output. Use only made-up test data. Open a pull request when done and do not merge it.

Review the pull request, run the tests yourself and merge only after you approve it.

Expected Results and Benefits

This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.

This is a suggested workflow, not a reported outcome. Devin's docs describe an AI software engineer that can write, run and test code, with a full desktop environment including a shell, IDE and browser, and say tasks with a clear start, end and success criteria work best. They do not report timings or quality for small API projects.

Limitations and Considerations

A small exercise like this does not show that authentication, authorization or deployment are ready for production; review those separately. Check how your organisation grants access to Devin and how sessions count against your plan. Keep secrets out of the spec and use test data only. Results depend on your setup and were not independently reproduced by Top 200 Repos.

Sources

  1. Introducing Devin - Devin Docs (opens in a new tab)

    Project documentation · docs.devin.ai · Undated · Source checked 26 Nov 2026, 17:27 UTC

    What this source supports
    • Devin is an autonomous AI software engineer that can write, run and test code.
    • Devin’s terminal shows commands being executed and their output logs; you can also copy the shell output for debugging purposes.
  2. When to Use Devin - Devin Docs (opens in a new tab)

    Project documentation · docs.devin.ai · Undated · Source checked 26 Nov 2026, 17:27 UTC

    What this source supports
    • Devin has a full desktop environment with a shell, IDE, and browser.
    • Good tasks have a clear start and end, plus explicit success criteria; tasks with test suites, CI checks, or verifiable outcomes yield the best results.
Report a problem

More with Devin

Planned, not done

Remove Obsolete Feature Flags Through Tested PRs

Ask Devin to remove one retired feature flag at a time, run the tests and open a pull request that you check against CI and your own flag records before merging.

docs.devin.ai
Planned, not done

Delegate Small Code Defects to Devin With Clear Scope

Hand Devin one narrowly scoped bug at a time, with steps to reproduce and a test that defines done, and review the pull request it opens before anything merges.

docs.devin.ai
Planned, not done

Implement a WordPress Marketing Site From a Figma Design

Connect Devin to Figma through an MCP integration and have it build a WordPress theme for a marketing site page by page, checking its work in its own browser and returning pull requests for review.

docs.devin.ai

View all: Devin