-
-
Notifications
You must be signed in to change notification settings - Fork 694
Expand file tree
/
Copy pathopenapi.yaml
More file actions
242 lines (242 loc) · 6.87 KB
/
openapi.yaml
File metadata and controls
242 lines (242 loc) · 6.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
openapi: 3.0.3
info:
title: Behavioral Science API
description: Apply behavioral science to products, funnels, copy, and pricing. Credit-based billing.
version: 1.0.0
contact:
url: "https://phoslabs.io"
x-origin:
- format: openapi
url: https://phoslabs.io/api/v1/openapi.json
version: 3.0
x-providerName: phoslabs.io
servers:
- url: https://phoslabs.io
description: Production
security:
- BearerAuth:
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: API key from /api/trial or purchased at /credits
schemas:
SuccessResponse:
type: object
properties:
success:
type: boolean
example: true
result:
type: object
description: Tool-specific result
credits_remaining:
type: integer
nullable: true
ErrorResponse:
type: object
properties:
error:
type: string
credits_remaining:
type: integer
nullable: true
paths:
/api/v1/audit:
post:
summary: Full behavioral audit
description: Run a comprehensive behavioral science audit on a product or service. 80 credits.
operationId: audit
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
product_description:
type: string
description: Description of the product or service to audit
url:
type: string
description: URL of the product (optional)
industry:
type: string
goal:
type: string
required:
- product_description
responses:
200:
description: Audit results
content:
application/json:
schema:
$ref: #/components/schemas/SuccessResponse
401:
description: Invalid API key
402:
description: Insufficient credits
/api/v1/diagnose:
post:
summary: Diagnose funnel dropoff
description: Identify behavioral reasons for funnel dropoff. 10 credits.
operationId: diagnose
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
funnel_description:
type: string
description: Description of the funnel or journey
data:
type: object
description: Optional analytics data
industry:
type: string
required:
- funnel_description
responses:
200:
description: Diagnosis results
content:
application/json:
schema:
$ref: #/components/schemas/SuccessResponse
401:
description: Invalid API key
402:
description: Insufficient credits
/api/v1/fix-checkout:
post:
summary: Redesign checkout flow
description: Behavioral science redesign of a checkout or decision flow. 30 credits.
operationId: fixCheckout
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
checkout_flow:
type: string
description: Current checkout flow description
required:
- checkout_flow
responses:
200:
description: Redesigned flow
content:
application/json:
schema:
$ref: #/components/schemas/SuccessResponse
401:
description: Invalid API key
402:
description: Insufficient credits
/api/v1/copy:
post:
summary: Behavioral copywriting
description: Rewrite copy using social proof, scarcity, framing, and other behavioral principles. 20 credits.
operationId: copy
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
draft:
type: string
description: Draft copy to rewrite
goal:
type: string
description: Goal of the copy (e.g. increase signups)
required:
- draft
- goal
responses:
200:
description: Rewritten copy
content:
application/json:
schema:
$ref: #/components/schemas/SuccessResponse
401:
description: Invalid API key
402:
description: Insufficient credits
/api/v1/pricing:
post:
summary: Pricing optimization
description: Optimize pricing strategy using anchoring, decoy effects, and behavioral economics. 25 credits.
operationId: pricing
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
product:
type: string
description: Product or service to optimize pricing for
context:
type: string
persona:
type: string
required:
- product
responses:
200:
description: Pricing strategy
content:
application/json:
schema:
$ref: #/components/schemas/SuccessResponse
401:
description: Invalid API key
402:
description: Insufficient credits
/api/v1/detect-biases:
post:
summary: Detect cognitive biases
description: Identify cognitive biases in decision text or recommendations. 3 credits.
operationId: detectBiases
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
text:
type: string
description: Text to analyze for biases
required:
- text
responses:
200:
description: Detected biases
content:
application/json:
schema:
$ref: #/components/schemas/SuccessResponse
401:
description: Invalid API key
402:
description: Insufficient credits
/api/v1/tools:
get:
summary: List available tools
description: List all REST API tools with descriptions, pricing, and input schemas.
operationId: listTools
security:
responses:
200:
description: Tool listing