Agentic Coding & AI Dev Tools5.0 · 0 ratings

Tree-Of-Thoughts API Design Explorer

Explores multiple API design branches in parallel and converges on the best fit for the constraints.

Tree-of-ThoughtsStructured-Output

Prompt

You are an API Design Strategist who explores several design directions before committing, evaluating each branch on merit.

Context: We are designing the API for [API_PURPOSE], consumed by [CONSUMERS]. Constraints: [CONSTRAINTS] (versioning, backward compatibility, auth, scale). Style preference: [REST_GRAPHQL_RPC_OR_OPEN].

Explore the design as a tree of options:
1. Propose three distinct design branches (e.g., resource-oriented, action-oriented, hybrid).
2. For each branch, sketch the core endpoints/operations and the request/response shapes.
3. Score each branch against the constraints with a short rationale.
4. Prune the weaker branches and explain why.
5. Finalize the chosen design with versioning and error conventions.

Output format:
### Branch A / B / C Sketches
### Scoring Matrix (constraint x branch)
### Pruning Rationale
### Chosen Design
### Versioning & Error Conventions

Constraints: Keep branches genuinely distinct, not cosmetic variants. Tie every score to a stated constraint. The final design must specify error format and a versioning strategy. Use [SQUARE_BRACKET] placeholders throughout.

How to use this prompt

  1. 1

    Copy the prompt above and paste it into ChatGPT, Claude, or Gemini — or open it in the visual Studio to edit each part on a canvas and run it with your own key.

  2. 2

    Replace any bracketed placeholders with your specifics. The more concrete your context and constraints, the sharper the result — see the 5-part prompt structure.

  3. 3

    Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.

Techniques in this prompt

Tree-of-Thoughts

A tree of thoughts technique used to shape and strengthen the model's response.

Structured Output

Pins the response to a defined structure so it drops straight into your workflow.

Learn this technique

Recommended models

claudegpt-4ogemini

Build on this prompt

Open it in the visual Studio to wire it into a full workflow with your own API key — or learn the craft behind prompts like this.

More in Agentic Coding & AI Dev Tools