Create api-openai.yaml

patch-1
geeknik 2023-12-17 18:53:55 +00:00 committed by GitHub
parent e6c20a24de
commit daee70d4be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
id: api-openai
info:
name: OpenAI API Test
author: geeknik
severity: info
reference:
- https://platform.openai.com/docs/api-reference
metadata:
max-request: 1
tags: token-spray,openai
self-contained: true
http:
- method: POST
path:
- "https://api.openai.com/v1/engines/davinci-codex/completions"
headers:
Content-Type: application/json
Authorization: Bearer {{token}}
matchers:
- type: word
part: body
words:
- 'invalid_request_error'
- 'Incorrect API key'
- 'invalid_api_key'
condition: or
negative: true