---
title: "Turn an OpenAPI Spec Into API Test Cases With an LLM"
description: "Give a model an OpenAPI spec and get a checklist of OWASP API Top 10 test cases to run yourself under scope. The model writes the list and sends no request."
canonical: https://pentestllm.ai/api-security-testing-ai
generated: 2026-11-27T06:25:48.487Z
source: https://pentestllm.ai/api-security-testing-ai
base_url: https://api.pentestllm.ai/v1
---

API test cases from a spec

# OWASP API Top 10 test cases from a spec

Give `orca-zero-1.5-cybersecurity` at https://api.pentestllm.ai/v1 an OpenAPI spec and get a checklist of OWASP API Top 10 test cases, one per endpoint and risk, for an authorized test you run yourself. The model reads the spec and writes the list, sends no request to the API under test, holds no credential and reaches no host, and you take the checklist to the client’s staging environment, inside the signed scope, where a tester decides what each case shows.

[Prices per token](https://pentestllm.ai/pricing)

[Get a key](https://app.pentestllm.ai/console) [Try it free in the browser](https://pentestllm.ai/playground)

```bash
curl https://api.pentestllm.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-ptl-live-…" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto/security",
    "messages": [{"role": "user", "content": "Rank these scanner findings by severity and say what to verify first."}]
  }'
```

## The model plans the test; it does not run it

This page is about test design. You hand the model a document, the OpenAPI spec, and it returns a document, a list of things worth checking. The requests against the live API are made by you, with your tools, against the environment the client approved. Nothing here fires a call at the API. That separation is the whole point: the model is good at reading a spec and enumerating what the API Top 10 says to look for, and it is in no position to decide what is in scope or to touch a client system. Keep the [rules of engagement](https://pentestllm.ai/tools/rules-of-engagement) open while you work, because a spec often lists endpoints the test is not authorized to touch.

## Send the spec, with the secrets taken out

An OpenAPI spec can carry example tokens, server URLs and sometimes real identifiers. Strip the `servers` block to a placeholder, remove example credentials, and generalize any customer name in the paths before the request leaves your machine. The gateway’s [redaction setting](https://pentestllm.ai/features/files-and-redaction) is a second pass for secrets, but the spec is a file you control, so trim it first. The model needs the paths, the methods, the parameters and the auth scheme; it does not need the client’s real host or a live key.

## Ask for cases mapped to the OWASP API Top 10

Ask the model to walk each path and method and, for each, name the API Top 10 risks that apply and one concrete test case per risk. Broken object-level authorization (BOLA) wants a case that requests another user’s object id. Broken function-level authorization wants a case that calls an admin method as a normal role. Mass assignment wants a case that posts a field the client should not accept. Pin the answer to a schema so each case comes back with the path, the method, the risk id, the step and the expected safe behavior. Use `auto/security` as the model id, and the router passes a structured request to a build that keeps to the schema. A case your tester cannot map back to an endpoint in the spec is one the model invented, so drop it.

## Read the cases before you run any of them

The checklist is a draft. A model reading a spec does not know which endpoints are deployed, which are deprecated, or which the client has already fixed. It will sometimes write a case for a risk that does not apply to the auth scheme in the spec, and it will miss a business-logic flaw a spec cannot show. Have the tester read the list, cut the cases that do not fit, and add the ones only a human who understands the application would think of. The model’s list is a fast first draft of the methodical part, not the test plan.

## Run them under scope and record what each shows

With a reviewed list, the tester runs each case by hand or with the API client the engagement already uses, against the staging environment in the scope. Record the request and the response for each case as evidence, the way you would for any finding. The model never saw the live API and never will in this workflow; it helped you decide what to check, and the proof that a check failed or passed is something you collected under authorization. A case that fails becomes a finding only after the tester confirms the response really shows the weakness.

## Reuse the list as a regression checklist

Because the cases are bound to the spec, they are worth keeping. When the client ships a new version of the API, diff the spec, send the model only the changed paths, and extend the checklist. Over a few engagements this becomes a per-client regression list that a tester trusts because a tester built it, with the model doing the enumeration each time. The authorization is still per engagement; the checklist is the reusable part, not a standing permission to test.

## 16 security builds, priced per token

USD per million tokens, live on 2026-11-27; `auto/security` bills at the build that answers.

Detected refusals and invalid non-streamed JSON qualify for automatic refunds within the daily cap. [Verify your receipt](https://pentestllm.ai/statements/verify).

| Model | Build | Input $/M | Output $/M | Context | Wire formats |
| --- | --- | --- | --- | --- | --- |
| [Qwen3.8 27B Cybersecurity](https://pentestllm.ai/models/qwen3.8-27b-cybersecurity) qwen3.8-27b-cybersecurity | Security | $0.40 | $2.40 | 262K | openai |
| [Uncensored Qwen3.8 27b Cybersecurity](https://pentestllm.ai/models/qwen3.8-27b-cybersecurity-uncensored) qwen3.8-27b-cybersecurity-uncensored | Security | $0.40 | $2.40 | 262K | openai |
| [Gemma 4 26B A4B Cybersecurity](https://pentestllm.ai/models/gemma-4-26b-a4b-it-cybersecurity) gemma-4-26b-a4b-it-cybersecurity | Security | $0.4224 | $1.3376 | 262K | openai |
| [Gemma 4 26B A4B Cybersecurity (Uncensored)](https://pentestllm.ai/models/gemma-4-26b-a4b-it-cybersecurity-uncensored) gemma-4-26b-a4b-it-cybersecurity-uncensored | Security | $0.48 | $1.52 | 262K | openai |
| [GLM-5.3 Flash Cybersecurity](https://pentestllm.ai/models/glm-5.3-flash-cybersecurity) glm-5.3-flash-cybersecurity | Security | $0.4935 | $1.645 | 1049K | openai |
| [GLM-5.3 Flash Cybersecurity (Uncensored)](https://pentestllm.ai/models/glm-5.3-flash-cybersecurity-uncensored) glm-5.3-flash-cybersecurity-uncensored | Security | $0.5093 | $1.6975 | 1049K | openai |
| [Red Team (Flash)](https://pentestllm.ai/models/uplink-red-team-flash) uplink-red-team-flash | Security | $0.90 | $3.00 | 1000K | openai |
| [Red Team (Pro)](https://pentestllm.ai/models/uplink-red-team-pro) uplink-red-team-pro | Security | $1.50 | $6.00 | – | openai |
| [OrcaCyber MiniMax M3.1 Flash](https://pentestllm.ai/models/minimax-m3.1-flash-cybersecurity) minimax-m3.1-flash-cybersecurity | Security | $2.00 | $4.00 | 262K | openai |
| [OrcaCyber MiniMax M3.1 Flash (Uncensored)](https://pentestllm.ai/models/minimax-m3.1-flash-cybersecurity-uncensored) minimax-m3.1-flash-cybersecurity-uncensored | Security | $2.00 | $4.00 | 262K | openai |
| [OrcaCyber Qwen3.8 Flash Next (Uncensored)](https://pentestllm.ai/models/orcacyber-qwen3.8-flash-next-uncensored) orcacyber-qwen3.8-flash-next-uncensored | Security | $2.00 | $4.00 | 262K | openai |
| [OrcaCyber Qwen3.8 Flash Next](https://pentestllm.ai/models/qwen3.8-flash-next-cybersecurity) qwen3.8-flash-next-cybersecurity | Security | $2.00 | $4.00 | 262K | openai |
| [Uncensored Qwen3.8 Flash Next Cybersecurity](https://pentestllm.ai/models/qwen3.8-flash-next-cybersecurity-uncensored) qwen3.8-flash-next-cybersecurity-uncensored | Security | $2.00 | $4.00 | 262K | openai |
| [Cyber Frontier](https://pentestllm.ai/models/cyber-frontier) cyber-frontier | Security | $5.25 | $15.75 | 1049K | openai |
| [OrcaCyber Zero 1.5](https://pentestllm.ai/models/orca-zero-1.5-cybersecurity) orca-zero-1.5-cybersecurity | Security | $7.50 | $18.75 | 999K | openai |
| [OrcaCyber Zero 1.5 (Uncensored)](https://pentestllm.ai/models/orca-zero-1.5-cybersecurity-uncensored) orca-zero-1.5-cybersecurity-uncensored | Security | $7.50 | $18.75 | 999K | openai |

[Full price list and tool fees](https://pentestllm.ai/pricing) · [Every model](https://pentestllm.ai/models) · [API docs](https://pentestllm.ai/docs)

## Questions

### Does the model send requests to the API?

No. It reads the OpenAPI spec you paste and returns a list of test cases as text. It holds no credential, has no HTTP tool and reaches no host. Every request against the live API is made by you, with your own client, against the environment the client authorized.

### Which model should write the cases?

orca-zero-1.5-cybersecurity has a large context window and handles a full spec in one request; for a smaller spec qwen3.8-27b-cybersecurity is enough. Both are on the live catalog and answer on the OpenAI and Anthropic routes.

### Can I trust the checklist as the test plan?

Treat it as a draft. The model does not know which endpoints are live or already fixed, and it cannot see business-logic flaws a spec hides. The tester reviews the list, cuts what does not apply and adds what only a person would catch, then runs the cases under scope.

### Can I reuse the checklist on the next version of the API?

Yes, because each case is bound to the spec. Diff the new spec, send the model only the changed paths, and extend the list. The authorization is still per engagement; the checklist is the reusable part, not a standing permission to test.

## Read next

[LLM application pentesting Testing an LLM application against the OWASP Top 10 for LLM apps, with an attacker model inside your scope.](https://pentestllm.ai/llm-application-pentesting) [AI vulnerability triage Dedupe, rank and route findings with a model, and a person confirming each decision.](https://pentestllm.ai/ai-vulnerability-triage) [Pentest report writing Drafting findings, impact, remediation and the executive summary, with client data redacted first.](https://pentestllm.ai/pentest-report-writing)

Facts about other products and tools on this page were read from their own pages on 22 November 2026: [OWASP API Security Top 10 (2023)](https://owasp.org/API-Security/editions/2023/en/0x11-t10/). They change; check the source before relying on a figure.

## One key, from $3

For systems you own or may test in writing: [acceptable use](https://pentestllm.ai/acceptable-use).

[Get a key](https://app.pentestllm.ai/console)
