Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion snippets/whitelabel/ai/json.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@
"completion": "<h4 class=\"sr-only select-none\">ChatGPT said: ...",
"sources": "<section aria-label=\"Sources\" ...",
"ads": "<div class=\"border-token-border-default mt-2 border-t py-4 text-sm\" ...",
"fanouts": ["best basketball shoes for 2026"],
"sse": "{\"type\": \"conversation_detail_metadata\" ...",
"fanouts": [
"best basketball shoes 2026",
"top rated basketball shoes 2026 reviews",
"best performance basketball shoes 2026",
"best basketball shoes for guards 2026",
"best basketball shoes for wide feet 2026",
"best outdoor basketball shoes 2026",
"most popular basketball shoes 2026"
],
"country": "US",
"city": "Portland"
}
Expand Down
2 changes: 1 addition & 1 deletion snippets/whitelabel/autoscaling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const Autoscaling = () => {
return (
<Warning>
This endpoint autoscales; if you receive a <code>503</code> response, maintain traffic and
expect errors to resolve within a couple minutes.
expect errors to resolve within a minute.
</Warning>
);
};
8 changes: 8 additions & 0 deletions snippets/whitelabel/search/callback.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### Push notification

```shell
curl -H "Authorization: Bearer $MASSIVE_TOKEN" \
'https://render.joinmassive.com/search'\
'?terms=amazon+simple+queue+service'\
'&callback=https://webhook.site/02e249f8-1faf-4fab-bcf5-78ce683e85a8'
```
7 changes: 7 additions & 0 deletions snippets/whitelabel/search/url.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Alternative URL

```shell
curl -H "Authorization: Bearer $MASSIVE_TOKEN" \
'https://render.joinmassive.com/search'\
'?url=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Dfoo%2Bbar%2Bbaz%26hl%3Dfr%26gl%3Dfr%26ie%3DUTF-8'
```
27 changes: 14 additions & 13 deletions web-render/ai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,20 @@ Completions are returned as structured JSON, rendered HTML, or raw (unrendered)
If you set the output to JSON, your completion will be parsed into an object with the
[geotargeting keys and values above](#service-usage) and following chat keys and values:

| Key | Value |
| :------------------- | :----------------------------------------------------------------------------------------------------------------------- |
| `model` | The AI model that generated the completion |
| `query` | The user prompt that the completion was generated for |
| `html` | The rendered HTML of the entire conversation |
| `prompt` | The rendered HTML of just the prompt portion of the conversation |
| `completion` | The rendered HTML of just the completion portion of the conversation |
| `sources` | The rendered HTML of just the sources portion of the conversation |
| `ads` | The rendered HTML of just the ads portion of the conversation |
| `fanouts` | An array of the fanout queries that the model searched to generate the completion; only some models expose these queries |
| `device` | The emulated device name that the conversation was had on |
| `language` (planned) | The common name or ISO code of the language that the conversation is in |
| `display` (planned) | The common name or ISO code of the display language that conversation interface is in |
| Key | Value |
| :----------------------- | :----------------------------------------------------------------------------------------------------------------------- |
| `model` | The AI model that generated the completion |
| `query` | The user prompt that the completion was generated for |
| `html` | The rendered HTML of the entire conversation |
| `prompt` | The rendered HTML of just the prompt portion of the conversation |
| `completion` | The rendered HTML of just the completion portion of the conversation |
| `sources` | The rendered HTML of just the sources portion, if any, of the conversation |
| `ads` | The rendered HTML of just the ads portion, if any, of the conversation |
| `sse` (ChatGPT only) | The server-sent events JSON that was used to populate the conversation HTML |
| `fanouts` (ChatGPT only) | An array of the fanout queries that the model searched to generate the completion; only some models expose these queries |
Comment on lines +94 to +97
| `device` | The emulated device name that the conversation was had on |
| `language` (planned) | The common name or ISO code of the language that the conversation is in |
| `display` (planned) | The common name or ISO code of the display language that conversation interface is in |

<Accordion icon='code' title='View JSON example'>
<Json />
Expand Down
187 changes: 144 additions & 43 deletions web-render/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@
"schema": { "type": "string", "example": null },
"in": "query"
},
{
"name": "url",
"description": "The encoded URL of the results page to retrieve; if given, the URL overrides any of the above params.",
"schema": {
"type": "string",
"format": "uri",
"example": "https://www.google.com/search?q=foo+bar+baz&hl=fr&gl=fr&ie=UTF-8"
Comment on lines +85 to +89
},
"in": "query"
},
{
"name": "awaiting",
"description": "The lazy result features to wait to load; any AI overview, which can take significant time to generate, is awaited for a maximum of **1 minute**; multiple features can be provided by repeating the key; lazy results aren’t awaited by default.",
Expand All @@ -97,6 +107,15 @@
"description": "The synchronous or asynchronous mode of results retrieval (see the [async resource](search/results)).",
"schema": { "$ref": "#/components/schemas/Mode" },
"in": "query"
},
{
"name": "callback",
"description": "The HTTP or HTTPS callback URL or Amazon SQS queue URL or ARN to notify when the (prerequisite) asynchronous results have been retrieved.",
"schema": {
"type": "string",
"example": "https://webhook.site/02e249f8-1faf-4fab-bcf5-78ce683e85a8"
},
"in": "query"
}
],
"responses": {
Expand Down Expand Up @@ -393,7 +412,7 @@
"description": "The difficulty pool to attempt to access the URL from.",
"schema": {
"type": "string",
"enum": ["low", "medium", "high (planned)"],
"enum": ["low", "medium", "high"],
"default": "low",
"example": "low"
},
Expand Down Expand Up @@ -613,7 +632,7 @@
"example": "user@example.com"
},
"credits": {
"description": "The number of credits to grant the account.",
"description": "The number of API credits to preload the account with.",
"type": "integer",
"example": 1000
}
Expand All @@ -633,7 +652,7 @@
"type": "object",
"properties": {
"email": {
"description": "The account email address as recorded by the API.",
"description": "The email address of the new account as recorded by the API.",
"type": "string",
"format": "email",
"example": "user@example.com"
Expand All @@ -642,9 +661,14 @@
"description": "The bearer token issued to the account for authentication.",
"type": "string",
"example": "a1-0dF6qKHYD7SNU5kAtjOmwHpH3iFgpylA"
},
"credits": {
"description": "The number of initial credits granted to the account.",
"type": "integer",
"example": 1000
}
},
"required": ["email", "token"]
"required": ["email", "token", "credits"]
}
}
}
Expand All @@ -658,6 +682,54 @@
"500": { "$ref": "#/components/responses/unknownError" }
}
},
"get": {
"summary": "Credit balances",
"description": "Retrieve the settings and credits of one or more accounts.",
"parameters": [
{
"name": "email",
"description": "The (case-insensitive) email address of the user whose profile to fetch; multiple addresses can be provided by repeating the key; profiles for all addresses are fetched by default.",
"schema": {
"type": "array",
"items": { "type": "string", "format": "email", "example": "user@example.com" }
},
"in": "query"
}
],
"responses": {
"200": {
"description": "The account settings and credits.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"email": {
"description": "The account email address.",
"type": "string",
"format": "email",
"example": "user@example.com"
},
"credits": {
"description": "The number of remaining API credits allocated to the account.",
"type": "integer",
"example": 1000
}
},
"required": ["email", "credits"]
}
}
}
}
},
"401": { "$ref": "#/components/responses/authenticationError" },
"403": { "$ref": "#/components/responses/authorizationError" },
"429": { "$ref": "#/components/responses/throttlingError" },
"500": { "$ref": "#/components/responses/unknownError" }
}
},
"patch": {
"summary": "Credit grant",
"description": "Allocate credits to an account.",
Expand All @@ -668,13 +740,13 @@
"type": "object",
"properties": {
"email": {
"description": "The (case-insensitive) email address of the user whose account to grant credits to.",
"description": "The (case-insensitive) email address of the user whose account to grant credits.",
"type": "string",
"format": "email",
"example": "user@example.com"
},
"amount": {
"description": "The number of credits to grant the account.",
"description": "The number of additional API credits to grant the account.",
"type": "integer",
"example": 1000
}
Expand All @@ -687,7 +759,7 @@
},
"responses": {
"200": {
"description": "The account credits.",
"description": "The updated account credits.",
"content": {
"application/json": {
"schema": {
Expand All @@ -700,7 +772,7 @@
"example": "user@example.com"
},
"credits": {
"description": "The number of granted credits as recorded by the API.",
"description": "The number of updated API credits allocated to the account.",
"type": "integer",
"example": 1000
}
Expand All @@ -719,51 +791,59 @@
"500": { "$ref": "#/components/responses/unknownError" }
}
},
"get": {
"summary": "Credit balances",
"description": "Retrieve the settings and remaining credits of one or more accounts.",
"parameters": [
{
"name": "email",
"description": "The (case-insensitive) email address of the user whose profile to fetch; multiple addresses can be provided by repeating the key; profiles for all addresses are fetched by default.",
"schema": {
"type": "array",
"items": { "type": "string", "format": "email", "example": "user@example.com" }
},
"in": "query"
}
],
"delete": {
"summary": "User deactivation",
"description": "Disable an account.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"description": "The (case-insensitive) email address of the user whose account to deactivate.",
"type": "string",
"format": "email",
"example": "user@example.com"
}
},
"required": ["email"]
}
}
},
"required": true
},
"responses": {
"200": {
"description": "The account settings and credits.",
"description": "The confirmed account credits.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"email": {
"description": "The account email address.",
"type": "string",
"format": "email",
"example": "user@example.com"
},
"credits": {
"description": "The number of remaining credits allocated to the account.",
"type": "integer",
"example": 1000
}
"type": "object",
"properties": {
"email": {
"description": "The account email address.",
"type": "string",
"format": "email",
"example": "user@example.com"
},
"required": ["email", "credits"]
}
"credits": {
"description": "The zeroed-out credits as confirmed by the API.",
"type": "integer",
"example": 0
}
},
"required": ["email", "credits"]
}
}
}
},
"401": { "$ref": "#/components/responses/authenticationError" },
"403": { "$ref": "#/components/responses/authorizationError" },
"400": { "$ref": "#/components/responses/malformedError" },
"422": { "$ref": "#/components/responses/paramsError" },
"429": { "$ref": "#/components/responses/throttlingError" },
"404": { "$ref": "#/components/responses/unsupportedError" },
"500": { "$ref": "#/components/responses/unknownError" }
}
}
Expand Down Expand Up @@ -905,14 +985,29 @@
"minimum": 1,
"example": 17208
},
"credits": {
"description": "The number of credits consumed by the API calls.",
"type": "integer",
"minimum": 0,
"example": 17208
},
"meanSecs": {
"description": "The average number of elapsed seconds of the API calls.",
"type": "number",
"minimum": 0,
"example": 6.78
}
},
"required": ["email", "from", "to", "service", "result", "calls", "meanSecs"]
"required": [
"email",
"from",
"to",
"service",
"result",
"calls",
"credits",
"meanSecs"
]
}
}
}
Expand Down Expand Up @@ -1196,7 +1291,12 @@
"type": "string",
"example": "<div class=\"border-token-border-default mt-2 border-t py-4 text-sm\" ..."
},
"fanouts": {
"sse (ChatGPT only)": {
"description": "The server-sent events JSON that was used to populate the conversation HTML.",
"type": "string",
"example": "{\"type\": \"conversation_detail_metadata\" ..."
},
Comment on lines +1294 to +1298
"fanouts (ChatGPT only)": {
"description": "The fanout queries that the model searched to generate the completion; only some models expose these queries.",
"type": "array",
"items": { "type": "string" },
Expand Down Expand Up @@ -1249,6 +1349,7 @@
"completion",
"sources",
"ads",
"sse",
"fanouts"
]
Comment on lines 1350 to 1354
},
Expand Down Expand Up @@ -1342,7 +1443,7 @@
"text/plain": {
"schema": {
"type": "string",
"example": "Service is autoscaling; please retry in 180 seconds"
"example": "Service is autoscaling; please retry in 60 seconds"
}
}
}
Expand Down
Loading