AI Functions
AI Functions combine the power of CloudBrowser with OpenAI's artificial intelligence to process and analyze web content automatically. These functions allow you to extract HTML from any webpage and transform it using custom prompts, generating summaries, translations, format conversions, and data analysis in a single API call.
Common use cases:
π Extract product prices and data
π Generate automatic content summaries
π Translate entire web pages
π Convert HTML tables to structured formats (JSON, CSV)
π Analyze and extract specific information with custom prompts
Note: Currently, only OpenAI is supported as the AI provider. In the future, we may support other providers.
Common Request Body
Every request must include an openAIConfiguration
object in the body:
{
"openAIConfiguration": {
"apiKey": "string",
"model": "string"
},
// Operation-specific body below
}
Where:
apiKey
: Your OpenAI API key.model
: The OpenAI model to use (e.g.,gpt-4
).
Response Format
All requests return a standard response structure:
{
"status": "ResponseStatus",
"response": "string",
"openAiError": "AIError (optional)"
}
status
: The request status (see theResponseStatus
enum).response
: The output generated by OpenAI.openAiError
(optional): Any OpenAI-specific error (see theAIError
enum).
public enum AIError : byte {
UNKNOWN = 0,
CONTENT_FLAGGED = 1,
TOO_LONG = 2,
INVALID_API_KEY = 3
}
Last updated