Create api-openai.yaml
parent
e6c20a24de
commit
daee70d4be
|
@ -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
|
Loading…
Reference in New Issue