Web Requests

Alerts

getSystemMessage

This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.

System messages help the AI assistant fulfill the optimal user experience by providing important context for the environment, news about important system updates to Web Requests. System messages are meant to be read by the AI assistant, without input or requisite knowledge by the user.


/get_system_message

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://plugin.wegpt.ai/get_system_message"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AlertsApi;

import java.io.File;
import java.util.*;

public class AlertsApiExample {

    public static void main(String[] args) {
        
        AlertsApi apiInstance = new AlertsApi();
        try {
            inline_response_200_8 result = apiInstance.getSystemMessage();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#getSystemMessage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AlertsApi;

public class AlertsApiExample {

    public static void main(String[] args) {
        AlertsApi apiInstance = new AlertsApi();
        try {
            inline_response_200_8 result = apiInstance.getSystemMessage();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#getSystemMessage");
            e.printStackTrace();
        }
    }
}

AlertsApi *apiInstance = [[AlertsApi alloc] init];

// This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.
[apiInstance getSystemMessageWithCompletionHandler: 
              ^(inline_response_200_8 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.AlertsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSystemMessage(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSystemMessageExample
    {
        public void main()
        {

            var apiInstance = new AlertsApi();

            try
            {
                // This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.
                inline_response_200_8 result = apiInstance.getSystemMessage();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AlertsApi.getSystemMessage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAlertsApi();

try {
    $result = $api_instance->getSystemMessage();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AlertsApi->getSystemMessage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AlertsApi;

my $api_instance = WWW::SwaggerClient::AlertsApi->new();

eval { 
    my $result = $api_instance->getSystemMessage();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AlertsApi->getSystemMessage: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AlertsApi()

try: 
    # This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.
    api_response = api_instance.get_system_message()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AlertsApi->getSystemMessage: %s\n" % e)

Parameters

Responses

Status: 200 - Retrieved a system message for the user.

Status: 204 - No system messages are available for the user at this time.

Status: 400 - The request was malformed.


App

createPlayground

Create a new p5js playground. It is best to *explain* your thought process to the user *before* initiating the request.

Create a new p5js playground with the specified name and canvas size. It will be its own directory with index.html with the <head><script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js"></script></head> that loads main.js in the body which is where your primary code will be.


/create_playground

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/create_playground"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AppApi;

import java.io.File;
import java.util.*;

public class AppApiExample {

    public static void main(String[] args) {
        
        AppApi apiInstance = new AppApi();
        Create_playground_body body = ; // Create_playground_body | 
        try {
            inline_response_200_5 result = apiInstance.createPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppApi#createPlayground");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AppApi;

public class AppApiExample {

    public static void main(String[] args) {
        AppApi apiInstance = new AppApi();
        Create_playground_body body = ; // Create_playground_body | 
        try {
            inline_response_200_5 result = apiInstance.createPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppApi#createPlayground");
            e.printStackTrace();
        }
    }
}
Create_playground_body *body = ; // 

AppApi *apiInstance = [[AppApi alloc] init];

// Create a new p5js playground. It is best to *explain* your thought process to the user *before* initiating the request.
[apiInstance createPlaygroundWith:body
              completionHandler: ^(inline_response_200_5 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.AppApi()
var body = ; // {{Create_playground_body}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createPlayground(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createPlaygroundExample
    {
        public void main()
        {

            var apiInstance = new AppApi();
            var body = new Create_playground_body(); // Create_playground_body | 

            try
            {
                // Create a new p5js playground. It is best to *explain* your thought process to the user *before* initiating the request.
                inline_response_200_5 result = apiInstance.createPlayground(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppApi.createPlayground: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAppApi();
$body = ; // Create_playground_body | 

try {
    $result = $api_instance->createPlayground($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppApi->createPlayground: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AppApi;

my $api_instance = WWW::SwaggerClient::AppApi->new();
my $body = WWW::SwaggerClient::Object::Create_playground_body->new(); # Create_playground_body | 

eval { 
    my $result = $api_instance->createPlayground(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppApi->createPlayground: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AppApi()
body =  # Create_playground_body | 

try: 
    # Create a new p5js playground. It is best to *explain* your thought process to the user *before* initiating the request.
    api_response = api_instance.create_playground(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppApi->createPlayground: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - The playground request was successfully handled.


editPlayground

Edit the primary 'main.js' client-side JavaScript of an existing p5js playground. A static index.html file will load a canvas.html iframe which will include <head><script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js"></script></head>, and the main.js script edited herein.

Explaining the changes you are about to make to the user is advisable *before* initiating the request. Debug output and errors will be logged to a logfile accessable at endpoint 'log_playground.'


/edit_playground

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/edit_playground"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AppApi;

import java.io.File;
import java.util.*;

public class AppApiExample {

    public static void main(String[] args) {
        
        AppApi apiInstance = new AppApi();
        Edit_playground_body body = ; // Edit_playground_body | 
        try {
            inline_response_200_6 result = apiInstance.editPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppApi#editPlayground");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AppApi;

public class AppApiExample {

    public static void main(String[] args) {
        AppApi apiInstance = new AppApi();
        Edit_playground_body body = ; // Edit_playground_body | 
        try {
            inline_response_200_6 result = apiInstance.editPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppApi#editPlayground");
            e.printStackTrace();
        }
    }
}
Edit_playground_body *body = ; // 

AppApi *apiInstance = [[AppApi alloc] init];

// Edit the primary 'main.js' client-side JavaScript of an existing p5js playground. A static index.html file will load a canvas.html iframe which will include , and the main.js script edited herein.
[apiInstance editPlaygroundWith:body
              completionHandler: ^(inline_response_200_6 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.AppApi()
var body = ; // {{Edit_playground_body}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.editPlayground(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class editPlaygroundExample
    {
        public void main()
        {

            var apiInstance = new AppApi();
            var body = new Edit_playground_body(); // Edit_playground_body | 

            try
            {
                // Edit the primary 'main.js' client-side JavaScript of an existing p5js playground. A static index.html file will load a canvas.html iframe which will include , and the main.js script edited herein.
                inline_response_200_6 result = apiInstance.editPlayground(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppApi.editPlayground: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAppApi();
$body = ; // Edit_playground_body | 

try {
    $result = $api_instance->editPlayground($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppApi->editPlayground: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AppApi;

my $api_instance = WWW::SwaggerClient::AppApi->new();
my $body = WWW::SwaggerClient::Object::Edit_playground_body->new(); # Edit_playground_body | 

eval { 
    my $result = $api_instance->editPlayground(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppApi->editPlayground: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AppApi()
body =  # Edit_playground_body | 

try: 
    # Edit the primary 'main.js' client-side JavaScript of an existing p5js playground. A static index.html file will load a canvas.html iframe which will include , and the main.js script edited herein.
    api_response = api_instance.edit_playground(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppApi->editPlayground: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - The playground edit attempt was processed, the results of which are returned in the response. It is recommended each successful source code update be summarized by reviewing **FULL** latet code source, citing line ranges.


Checkout

createCheckoutSession

This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!

This endpoint facilitates the payment process by creating a Stripe checkout session and returns the checkout URL. It handles payment methods, payment status, success, and cancellation URLs, and inserts the payment details into a database.


/create_checkout_session

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://plugin.wegpt.ai/create_checkout_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CheckoutApi;

import java.io.File;
import java.util.*;

public class CheckoutApiExample {

    public static void main(String[] args) {
        
        CheckoutApi apiInstance = new CheckoutApi();
        try {
            inline_response_200_3 result = apiInstance.createCheckoutSession();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CheckoutApi#createCheckoutSession");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CheckoutApi;

public class CheckoutApiExample {

    public static void main(String[] args) {
        CheckoutApi apiInstance = new CheckoutApi();
        try {
            inline_response_200_3 result = apiInstance.createCheckoutSession();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CheckoutApi#createCheckoutSession");
            e.printStackTrace();
        }
    }
}

CheckoutApi *apiInstance = [[CheckoutApi alloc] init];

// This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!
[apiInstance createCheckoutSessionWithCompletionHandler: 
              ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.CheckoutApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCheckoutSession(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCheckoutSessionExample
    {
        public void main()
        {

            var apiInstance = new CheckoutApi();

            try
            {
                // This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!
                inline_response_200_3 result = apiInstance.createCheckoutSession();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CheckoutApi.createCheckoutSession: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCheckoutApi();

try {
    $result = $api_instance->createCheckoutSession();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CheckoutApi->createCheckoutSession: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CheckoutApi;

my $api_instance = WWW::SwaggerClient::CheckoutApi->new();

eval { 
    my $result = $api_instance->createCheckoutSession();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CheckoutApi->createCheckoutSession: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CheckoutApi()

try: 
    # This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!
    api_response = api_instance.create_checkout_session()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CheckoutApi->createCheckoutSession: %s\n" % e)

Parameters

Responses

Status: 200 - The checkout session was successfully created, and the URL and instructions are provided.


Debug

logPlayground

This endpoint provides access to the user's output and error logs for a given playground.

Maintaining alignment with the mission to create a user-friendly and accessible interface, this endpoint provides access to the user's output and error logs for a given playground. This endpoint is intended to be used by the LLM to provide context for the user's code.


/log_playground

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/log_playground"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DebugApi;

import java.io.File;
import java.util.*;

public class DebugApiExample {

    public static void main(String[] args) {
        
        DebugApi apiInstance = new DebugApi();
        Log_playground_body body = ; // Log_playground_body | 
        try {
            inline_response_200_7 result = apiInstance.logPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DebugApi#logPlayground");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DebugApi;

public class DebugApiExample {

    public static void main(String[] args) {
        DebugApi apiInstance = new DebugApi();
        Log_playground_body body = ; // Log_playground_body | 
        try {
            inline_response_200_7 result = apiInstance.logPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DebugApi#logPlayground");
            e.printStackTrace();
        }
    }
}
Log_playground_body *body = ; // 

DebugApi *apiInstance = [[DebugApi alloc] init];

// This endpoint provides access to the user's output and error logs for a given playground.
[apiInstance logPlaygroundWith:body
              completionHandler: ^(inline_response_200_7 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.DebugApi()
var body = ; // {{Log_playground_body}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.logPlayground(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class logPlaygroundExample
    {
        public void main()
        {

            var apiInstance = new DebugApi();
            var body = new Log_playground_body(); // Log_playground_body | 

            try
            {
                // This endpoint provides access to the user's output and error logs for a given playground.
                inline_response_200_7 result = apiInstance.logPlayground(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DebugApi.logPlayground: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDebugApi();
$body = ; // Log_playground_body | 

try {
    $result = $api_instance->logPlayground($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DebugApi->logPlayground: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DebugApi;

my $api_instance = WWW::SwaggerClient::DebugApi->new();
my $body = WWW::SwaggerClient::Object::Log_playground_body->new(); # Log_playground_body | 

eval { 
    my $result = $api_instance->logPlayground(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DebugApi->logPlayground: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DebugApi()
body =  # Log_playground_body | 

try: 
    # This endpoint provides access to the user's output and error logs for a given playground.
    api_response = api_instance.log_playground(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DebugApi->logPlayground: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - The playground's log was successfully queried, and a log line entered to indicate the LLM / AI Assistant last checked the log.


Default

generateImage

Generates an image from the provided prompt. Every Web Requests user gets one free image per day, and it will be delivered in 1024x1024 pixels.


/generate_image

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/generate_image"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Generate_image_body body = ; // Generate_image_body | 
        try {
            inline_response_200_2 result = apiInstance.generateImage(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#generateImage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Generate_image_body body = ; // Generate_image_body | 
        try {
            inline_response_200_2 result = apiInstance.generateImage(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#generateImage");
            e.printStackTrace();
        }
    }
}
Generate_image_body *body = ; //  (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Generates an image from the provided prompt. Every Web Requests user gets one free image per day, and it will be delivered in 1024x1024 pixels.
[apiInstance generateImageWith:body
              completionHandler: ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.DefaultApi()
var opts = { 
  'body':  // {{Generate_image_body}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.generateImage(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class generateImageExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var body = new Generate_image_body(); // Generate_image_body |  (optional) 

            try
            {
                // Generates an image from the provided prompt. Every Web Requests user gets one free image per day, and it will be delivered in 1024x1024 pixels.
                inline_response_200_2 result = apiInstance.generateImage(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.generateImage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = ; // Generate_image_body | 

try {
    $result = $api_instance->generateImage($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->generateImage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::Generate_image_body->new(); # Generate_image_body | 

eval { 
    my $result = $api_instance->generateImage(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->generateImage: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
body =  # Generate_image_body |  (optional)

try: 
    # Generates an image from the provided prompt. Every Web Requests user gets one free image per day, and it will be delivered in 1024x1024 pixels.
    api_response = api_instance.generate_image(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->generateImage: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Image generated successfully


Faq

helpFaq

This endpoint retrieves FAQ information based on the category provided. If the user is asking for generic help, start with "What can Web Requests do?"

The help_faq endpoint is designed to provide markdown-formatted FAQ information based on the category specified in the request payload.


/help_faq

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/help_faq"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FaqApi;

import java.io.File;
import java.util.*;

public class FaqApiExample {

    public static void main(String[] args) {
        
        FaqApi apiInstance = new FaqApi();
        Help_faq_body body = ; // Help_faq_body | 
        try {
            inline_response_200_9 result = apiInstance.helpFaq(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FaqApi#helpFaq");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FaqApi;

public class FaqApiExample {

    public static void main(String[] args) {
        FaqApi apiInstance = new FaqApi();
        Help_faq_body body = ; // Help_faq_body | 
        try {
            inline_response_200_9 result = apiInstance.helpFaq(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FaqApi#helpFaq");
            e.printStackTrace();
        }
    }
}
Help_faq_body *body = ; //  (optional)

FaqApi *apiInstance = [[FaqApi alloc] init];

// This endpoint retrieves FAQ information based on the category provided. If the user is asking for generic help, start with "What can Web Requests do?"
[apiInstance helpFaqWith:body
              completionHandler: ^(inline_response_200_9 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.FaqApi()
var opts = { 
  'body':  // {{Help_faq_body}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.helpFaq(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class helpFaqExample
    {
        public void main()
        {

            var apiInstance = new FaqApi();
            var body = new Help_faq_body(); // Help_faq_body |  (optional) 

            try
            {
                // This endpoint retrieves FAQ information based on the category provided. If the user is asking for generic help, start with "What can Web Requests do?"
                inline_response_200_9 result = apiInstance.helpFaq(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FaqApi.helpFaq: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiFaqApi();
$body = ; // Help_faq_body | 

try {
    $result = $api_instance->helpFaq($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FaqApi->helpFaq: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FaqApi;

my $api_instance = WWW::SwaggerClient::FaqApi->new();
my $body = WWW::SwaggerClient::Object::Help_faq_body->new(); # Help_faq_body | 

eval { 
    my $result = $api_instance->helpFaq(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FaqApi->helpFaq: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.FaqApi()
body =  # Help_faq_body |  (optional)

try: 
    # This endpoint retrieves FAQ information based on the category provided. If the user is asking for generic help, start with "What can Web Requests do?"
    api_response = api_instance.help_faq(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FaqApi->helpFaq: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Successfully retrieved FAQ information.

Status: 400 - The request was malformed or the category is unsupported.


Game

createPlayground

Create a new p5js playground. It is best to *explain* your thought process to the user *before* initiating the request.

Create a new p5js playground with the specified name and canvas size. It will be its own directory with index.html with the <head><script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js"></script></head> that loads main.js in the body which is where your primary code will be.


/create_playground

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/create_playground"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GameApi;

import java.io.File;
import java.util.*;

public class GameApiExample {

    public static void main(String[] args) {
        
        GameApi apiInstance = new GameApi();
        Create_playground_body body = ; // Create_playground_body | 
        try {
            inline_response_200_5 result = apiInstance.createPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GameApi#createPlayground");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GameApi;

public class GameApiExample {

    public static void main(String[] args) {
        GameApi apiInstance = new GameApi();
        Create_playground_body body = ; // Create_playground_body | 
        try {
            inline_response_200_5 result = apiInstance.createPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GameApi#createPlayground");
            e.printStackTrace();
        }
    }
}
Create_playground_body *body = ; // 

GameApi *apiInstance = [[GameApi alloc] init];

// Create a new p5js playground. It is best to *explain* your thought process to the user *before* initiating the request.
[apiInstance createPlaygroundWith:body
              completionHandler: ^(inline_response_200_5 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.GameApi()
var body = ; // {{Create_playground_body}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createPlayground(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createPlaygroundExample
    {
        public void main()
        {

            var apiInstance = new GameApi();
            var body = new Create_playground_body(); // Create_playground_body | 

            try
            {
                // Create a new p5js playground. It is best to *explain* your thought process to the user *before* initiating the request.
                inline_response_200_5 result = apiInstance.createPlayground(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GameApi.createPlayground: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiGameApi();
$body = ; // Create_playground_body | 

try {
    $result = $api_instance->createPlayground($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GameApi->createPlayground: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GameApi;

my $api_instance = WWW::SwaggerClient::GameApi->new();
my $body = WWW::SwaggerClient::Object::Create_playground_body->new(); # Create_playground_body | 

eval { 
    my $result = $api_instance->createPlayground(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GameApi->createPlayground: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.GameApi()
body =  # Create_playground_body | 

try: 
    # Create a new p5js playground. It is best to *explain* your thought process to the user *before* initiating the request.
    api_response = api_instance.create_playground(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GameApi->createPlayground: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - The playground request was successfully handled.


editPlayground

Edit the primary 'main.js' client-side JavaScript of an existing p5js playground. A static index.html file will load a canvas.html iframe which will include <head><script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js"></script></head>, and the main.js script edited herein.

Explaining the changes you are about to make to the user is advisable *before* initiating the request. Debug output and errors will be logged to a logfile accessable at endpoint 'log_playground.'


/edit_playground

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/edit_playground"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GameApi;

import java.io.File;
import java.util.*;

public class GameApiExample {

    public static void main(String[] args) {
        
        GameApi apiInstance = new GameApi();
        Edit_playground_body body = ; // Edit_playground_body | 
        try {
            inline_response_200_6 result = apiInstance.editPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GameApi#editPlayground");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GameApi;

public class GameApiExample {

    public static void main(String[] args) {
        GameApi apiInstance = new GameApi();
        Edit_playground_body body = ; // Edit_playground_body | 
        try {
            inline_response_200_6 result = apiInstance.editPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GameApi#editPlayground");
            e.printStackTrace();
        }
    }
}
Edit_playground_body *body = ; // 

GameApi *apiInstance = [[GameApi alloc] init];

// Edit the primary 'main.js' client-side JavaScript of an existing p5js playground. A static index.html file will load a canvas.html iframe which will include , and the main.js script edited herein.
[apiInstance editPlaygroundWith:body
              completionHandler: ^(inline_response_200_6 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.GameApi()
var body = ; // {{Edit_playground_body}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.editPlayground(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class editPlaygroundExample
    {
        public void main()
        {

            var apiInstance = new GameApi();
            var body = new Edit_playground_body(); // Edit_playground_body | 

            try
            {
                // Edit the primary 'main.js' client-side JavaScript of an existing p5js playground. A static index.html file will load a canvas.html iframe which will include , and the main.js script edited herein.
                inline_response_200_6 result = apiInstance.editPlayground(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GameApi.editPlayground: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiGameApi();
$body = ; // Edit_playground_body | 

try {
    $result = $api_instance->editPlayground($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GameApi->editPlayground: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GameApi;

my $api_instance = WWW::SwaggerClient::GameApi->new();
my $body = WWW::SwaggerClient::Object::Edit_playground_body->new(); # Edit_playground_body | 

eval { 
    my $result = $api_instance->editPlayground(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GameApi->editPlayground: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.GameApi()
body =  # Edit_playground_body | 

try: 
    # Edit the primary 'main.js' client-side JavaScript of an existing p5js playground. A static index.html file will load a canvas.html iframe which will include , and the main.js script edited herein.
    api_response = api_instance.edit_playground(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GameApi->editPlayground: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - The playground edit attempt was processed, the results of which are returned in the response. It is recommended each successful source code update be summarized by reviewing **FULL** latet code source, citing line ranges.


Help

helpFaq

This endpoint retrieves FAQ information based on the category provided. If the user is asking for generic help, start with "What can Web Requests do?"

The help_faq endpoint is designed to provide markdown-formatted FAQ information based on the category specified in the request payload.


/help_faq

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/help_faq"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HelpApi;

import java.io.File;
import java.util.*;

public class HelpApiExample {

    public static void main(String[] args) {
        
        HelpApi apiInstance = new HelpApi();
        Help_faq_body body = ; // Help_faq_body | 
        try {
            inline_response_200_9 result = apiInstance.helpFaq(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HelpApi#helpFaq");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.HelpApi;

public class HelpApiExample {

    public static void main(String[] args) {
        HelpApi apiInstance = new HelpApi();
        Help_faq_body body = ; // Help_faq_body | 
        try {
            inline_response_200_9 result = apiInstance.helpFaq(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HelpApi#helpFaq");
            e.printStackTrace();
        }
    }
}
Help_faq_body *body = ; //  (optional)

HelpApi *apiInstance = [[HelpApi alloc] init];

// This endpoint retrieves FAQ information based on the category provided. If the user is asking for generic help, start with "What can Web Requests do?"
[apiInstance helpFaqWith:body
              completionHandler: ^(inline_response_200_9 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.HelpApi()
var opts = { 
  'body':  // {{Help_faq_body}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.helpFaq(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class helpFaqExample
    {
        public void main()
        {

            var apiInstance = new HelpApi();
            var body = new Help_faq_body(); // Help_faq_body |  (optional) 

            try
            {
                // This endpoint retrieves FAQ information based on the category provided. If the user is asking for generic help, start with "What can Web Requests do?"
                inline_response_200_9 result = apiInstance.helpFaq(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HelpApi.helpFaq: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiHelpApi();
$body = ; // Help_faq_body | 

try {
    $result = $api_instance->helpFaq($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HelpApi->helpFaq: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::HelpApi;

my $api_instance = WWW::SwaggerClient::HelpApi->new();
my $body = WWW::SwaggerClient::Object::Help_faq_body->new(); # Help_faq_body | 

eval { 
    my $result = $api_instance->helpFaq(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling HelpApi->helpFaq: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.HelpApi()
body =  # Help_faq_body |  (optional)

try: 
    # This endpoint retrieves FAQ information based on the category provided. If the user is asking for generic help, start with "What can Web Requests do?"
    api_response = api_instance.help_faq(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HelpApi->helpFaq: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Successfully retrieved FAQ information.

Status: 400 - The request was malformed or the category is unsupported.


Information

helpFaq

This endpoint retrieves FAQ information based on the category provided. If the user is asking for generic help, start with "What can Web Requests do?"

The help_faq endpoint is designed to provide markdown-formatted FAQ information based on the category specified in the request payload.


/help_faq

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/help_faq"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InformationApi;

import java.io.File;
import java.util.*;

public class InformationApiExample {

    public static void main(String[] args) {
        
        InformationApi apiInstance = new InformationApi();
        Help_faq_body body = ; // Help_faq_body | 
        try {
            inline_response_200_9 result = apiInstance.helpFaq(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InformationApi#helpFaq");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InformationApi;

public class InformationApiExample {

    public static void main(String[] args) {
        InformationApi apiInstance = new InformationApi();
        Help_faq_body body = ; // Help_faq_body | 
        try {
            inline_response_200_9 result = apiInstance.helpFaq(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InformationApi#helpFaq");
            e.printStackTrace();
        }
    }
}
Help_faq_body *body = ; //  (optional)

InformationApi *apiInstance = [[InformationApi alloc] init];

// This endpoint retrieves FAQ information based on the category provided. If the user is asking for generic help, start with "What can Web Requests do?"
[apiInstance helpFaqWith:body
              completionHandler: ^(inline_response_200_9 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.InformationApi()
var opts = { 
  'body':  // {{Help_faq_body}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.helpFaq(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class helpFaqExample
    {
        public void main()
        {

            var apiInstance = new InformationApi();
            var body = new Help_faq_body(); // Help_faq_body |  (optional) 

            try
            {
                // This endpoint retrieves FAQ information based on the category provided. If the user is asking for generic help, start with "What can Web Requests do?"
                inline_response_200_9 result = apiInstance.helpFaq(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InformationApi.helpFaq: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInformationApi();
$body = ; // Help_faq_body | 

try {
    $result = $api_instance->helpFaq($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InformationApi->helpFaq: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InformationApi;

my $api_instance = WWW::SwaggerClient::InformationApi->new();
my $body = WWW::SwaggerClient::Object::Help_faq_body->new(); # Help_faq_body | 

eval { 
    my $result = $api_instance->helpFaq(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InformationApi->helpFaq: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InformationApi()
body =  # Help_faq_body |  (optional)

try: 
    # This endpoint retrieves FAQ information based on the category provided. If the user is asking for generic help, start with "What can Web Requests do?"
    api_response = api_instance.help_faq(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InformationApi->helpFaq: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Successfully retrieved FAQ information.

Status: 400 - The request was malformed or the category is unsupported.


Log

logPlayground

This endpoint provides access to the user's output and error logs for a given playground.

Maintaining alignment with the mission to create a user-friendly and accessible interface, this endpoint provides access to the user's output and error logs for a given playground. This endpoint is intended to be used by the LLM to provide context for the user's code.


/log_playground

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/log_playground"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LogApi;

import java.io.File;
import java.util.*;

public class LogApiExample {

    public static void main(String[] args) {
        
        LogApi apiInstance = new LogApi();
        Log_playground_body body = ; // Log_playground_body | 
        try {
            inline_response_200_7 result = apiInstance.logPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogApi#logPlayground");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LogApi;

public class LogApiExample {

    public static void main(String[] args) {
        LogApi apiInstance = new LogApi();
        Log_playground_body body = ; // Log_playground_body | 
        try {
            inline_response_200_7 result = apiInstance.logPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogApi#logPlayground");
            e.printStackTrace();
        }
    }
}
Log_playground_body *body = ; // 

LogApi *apiInstance = [[LogApi alloc] init];

// This endpoint provides access to the user's output and error logs for a given playground.
[apiInstance logPlaygroundWith:body
              completionHandler: ^(inline_response_200_7 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.LogApi()
var body = ; // {{Log_playground_body}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.logPlayground(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class logPlaygroundExample
    {
        public void main()
        {

            var apiInstance = new LogApi();
            var body = new Log_playground_body(); // Log_playground_body | 

            try
            {
                // This endpoint provides access to the user's output and error logs for a given playground.
                inline_response_200_7 result = apiInstance.logPlayground(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LogApi.logPlayground: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiLogApi();
$body = ; // Log_playground_body | 

try {
    $result = $api_instance->logPlayground($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LogApi->logPlayground: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LogApi;

my $api_instance = WWW::SwaggerClient::LogApi->new();
my $body = WWW::SwaggerClient::Object::Log_playground_body->new(); # Log_playground_body | 

eval { 
    my $result = $api_instance->logPlayground(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LogApi->logPlayground: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LogApi()
body =  # Log_playground_body | 

try: 
    # This endpoint provides access to the user's output and error logs for a given playground.
    api_response = api_instance.log_playground(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LogApi->logPlayground: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - The playground's log was successfully queried, and a log line entered to indicate the LLM / AI Assistant last checked the log.


Logfile

logPlayground

This endpoint provides access to the user's output and error logs for a given playground.

Maintaining alignment with the mission to create a user-friendly and accessible interface, this endpoint provides access to the user's output and error logs for a given playground. This endpoint is intended to be used by the LLM to provide context for the user's code.


/log_playground

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/log_playground"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LogfileApi;

import java.io.File;
import java.util.*;

public class LogfileApiExample {

    public static void main(String[] args) {
        
        LogfileApi apiInstance = new LogfileApi();
        Log_playground_body body = ; // Log_playground_body | 
        try {
            inline_response_200_7 result = apiInstance.logPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogfileApi#logPlayground");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LogfileApi;

public class LogfileApiExample {

    public static void main(String[] args) {
        LogfileApi apiInstance = new LogfileApi();
        Log_playground_body body = ; // Log_playground_body | 
        try {
            inline_response_200_7 result = apiInstance.logPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogfileApi#logPlayground");
            e.printStackTrace();
        }
    }
}
Log_playground_body *body = ; // 

LogfileApi *apiInstance = [[LogfileApi alloc] init];

// This endpoint provides access to the user's output and error logs for a given playground.
[apiInstance logPlaygroundWith:body
              completionHandler: ^(inline_response_200_7 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.LogfileApi()
var body = ; // {{Log_playground_body}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.logPlayground(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class logPlaygroundExample
    {
        public void main()
        {

            var apiInstance = new LogfileApi();
            var body = new Log_playground_body(); // Log_playground_body | 

            try
            {
                // This endpoint provides access to the user's output and error logs for a given playground.
                inline_response_200_7 result = apiInstance.logPlayground(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LogfileApi.logPlayground: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiLogfileApi();
$body = ; // Log_playground_body | 

try {
    $result = $api_instance->logPlayground($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LogfileApi->logPlayground: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LogfileApi;

my $api_instance = WWW::SwaggerClient::LogfileApi->new();
my $body = WWW::SwaggerClient::Object::Log_playground_body->new(); # Log_playground_body | 

eval { 
    my $result = $api_instance->logPlayground(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LogfileApi->logPlayground: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LogfileApi()
body =  # Log_playground_body | 

try: 
    # This endpoint provides access to the user's output and error logs for a given playground.
    api_response = api_instance.log_playground(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LogfileApi->logPlayground: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - The playground's log was successfully queried, and a log line entered to indicate the LLM / AI Assistant last checked the log.


Messages

getSystemMessage

This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.

System messages help the AI assistant fulfill the optimal user experience by providing important context for the environment, news about important system updates to Web Requests. System messages are meant to be read by the AI assistant, without input or requisite knowledge by the user.


/get_system_message

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://plugin.wegpt.ai/get_system_message"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MessagesApi;

import java.io.File;
import java.util.*;

public class MessagesApiExample {

    public static void main(String[] args) {
        
        MessagesApi apiInstance = new MessagesApi();
        try {
            inline_response_200_8 result = apiInstance.getSystemMessage();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessagesApi#getSystemMessage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MessagesApi;

public class MessagesApiExample {

    public static void main(String[] args) {
        MessagesApi apiInstance = new MessagesApi();
        try {
            inline_response_200_8 result = apiInstance.getSystemMessage();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessagesApi#getSystemMessage");
            e.printStackTrace();
        }
    }
}

MessagesApi *apiInstance = [[MessagesApi alloc] init];

// This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.
[apiInstance getSystemMessageWithCompletionHandler: 
              ^(inline_response_200_8 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.MessagesApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSystemMessage(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSystemMessageExample
    {
        public void main()
        {

            var apiInstance = new MessagesApi();

            try
            {
                // This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.
                inline_response_200_8 result = apiInstance.getSystemMessage();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MessagesApi.getSystemMessage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMessagesApi();

try {
    $result = $api_instance->getSystemMessage();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MessagesApi->getSystemMessage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MessagesApi;

my $api_instance = WWW::SwaggerClient::MessagesApi->new();

eval { 
    my $result = $api_instance->getSystemMessage();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MessagesApi->getSystemMessage: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MessagesApi()

try: 
    # This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.
    api_response = api_instance.get_system_message()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MessagesApi->getSystemMessage: %s\n" % e)

Parameters

Responses

Status: 200 - Retrieved a system message for the user.

Status: 204 - No system messages are available for the user at this time.

Status: 400 - The request was malformed.


Payment

createCheckoutSession

This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!

This endpoint facilitates the payment process by creating a Stripe checkout session and returns the checkout URL. It handles payment methods, payment status, success, and cancellation URLs, and inserts the payment details into a database.


/create_checkout_session

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://plugin.wegpt.ai/create_checkout_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentApi;

import java.io.File;
import java.util.*;

public class PaymentApiExample {

    public static void main(String[] args) {
        
        PaymentApi apiInstance = new PaymentApi();
        try {
            inline_response_200_3 result = apiInstance.createCheckoutSession();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#createCheckoutSession");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentApi;

public class PaymentApiExample {

    public static void main(String[] args) {
        PaymentApi apiInstance = new PaymentApi();
        try {
            inline_response_200_3 result = apiInstance.createCheckoutSession();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#createCheckoutSession");
            e.printStackTrace();
        }
    }
}

PaymentApi *apiInstance = [[PaymentApi alloc] init];

// This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!
[apiInstance createCheckoutSessionWithCompletionHandler: 
              ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.PaymentApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCheckoutSession(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCheckoutSessionExample
    {
        public void main()
        {

            var apiInstance = new PaymentApi();

            try
            {
                // This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!
                inline_response_200_3 result = apiInstance.createCheckoutSession();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentApi.createCheckoutSession: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiPaymentApi();

try {
    $result = $api_instance->createCheckoutSession();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->createCheckoutSession: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentApi;

my $api_instance = WWW::SwaggerClient::PaymentApi->new();

eval { 
    my $result = $api_instance->createCheckoutSession();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PaymentApi->createCheckoutSession: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PaymentApi()

try: 
    # This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!
    api_response = api_instance.create_checkout_session()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentApi->createCheckoutSession: %s\n" % e)

Parameters

Responses

Status: 200 - The checkout session was successfully created, and the URL and instructions are provided.


Playground

createPlayground

Create a new p5js playground. It is best to *explain* your thought process to the user *before* initiating the request.

Create a new p5js playground with the specified name and canvas size. It will be its own directory with index.html with the <head><script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js"></script></head> that loads main.js in the body which is where your primary code will be.


/create_playground

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/create_playground"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PlaygroundApi;

import java.io.File;
import java.util.*;

public class PlaygroundApiExample {

    public static void main(String[] args) {
        
        PlaygroundApi apiInstance = new PlaygroundApi();
        Create_playground_body body = ; // Create_playground_body | 
        try {
            inline_response_200_5 result = apiInstance.createPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlaygroundApi#createPlayground");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PlaygroundApi;

public class PlaygroundApiExample {

    public static void main(String[] args) {
        PlaygroundApi apiInstance = new PlaygroundApi();
        Create_playground_body body = ; // Create_playground_body | 
        try {
            inline_response_200_5 result = apiInstance.createPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlaygroundApi#createPlayground");
            e.printStackTrace();
        }
    }
}
Create_playground_body *body = ; // 

PlaygroundApi *apiInstance = [[PlaygroundApi alloc] init];

// Create a new p5js playground. It is best to *explain* your thought process to the user *before* initiating the request.
[apiInstance createPlaygroundWith:body
              completionHandler: ^(inline_response_200_5 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.PlaygroundApi()
var body = ; // {{Create_playground_body}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createPlayground(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createPlaygroundExample
    {
        public void main()
        {

            var apiInstance = new PlaygroundApi();
            var body = new Create_playground_body(); // Create_playground_body | 

            try
            {
                // Create a new p5js playground. It is best to *explain* your thought process to the user *before* initiating the request.
                inline_response_200_5 result = apiInstance.createPlayground(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlaygroundApi.createPlayground: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiPlaygroundApi();
$body = ; // Create_playground_body | 

try {
    $result = $api_instance->createPlayground($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlaygroundApi->createPlayground: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PlaygroundApi;

my $api_instance = WWW::SwaggerClient::PlaygroundApi->new();
my $body = WWW::SwaggerClient::Object::Create_playground_body->new(); # Create_playground_body | 

eval { 
    my $result = $api_instance->createPlayground(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PlaygroundApi->createPlayground: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PlaygroundApi()
body =  # Create_playground_body | 

try: 
    # Create a new p5js playground. It is best to *explain* your thought process to the user *before* initiating the request.
    api_response = api_instance.create_playground(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PlaygroundApi->createPlayground: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - The playground request was successfully handled.


editPlayground

Edit the primary 'main.js' client-side JavaScript of an existing p5js playground. A static index.html file will load a canvas.html iframe which will include <head><script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js"></script></head>, and the main.js script edited herein.

Explaining the changes you are about to make to the user is advisable *before* initiating the request. Debug output and errors will be logged to a logfile accessable at endpoint 'log_playground.'


/edit_playground

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/edit_playground"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PlaygroundApi;

import java.io.File;
import java.util.*;

public class PlaygroundApiExample {

    public static void main(String[] args) {
        
        PlaygroundApi apiInstance = new PlaygroundApi();
        Edit_playground_body body = ; // Edit_playground_body | 
        try {
            inline_response_200_6 result = apiInstance.editPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlaygroundApi#editPlayground");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PlaygroundApi;

public class PlaygroundApiExample {

    public static void main(String[] args) {
        PlaygroundApi apiInstance = new PlaygroundApi();
        Edit_playground_body body = ; // Edit_playground_body | 
        try {
            inline_response_200_6 result = apiInstance.editPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlaygroundApi#editPlayground");
            e.printStackTrace();
        }
    }
}
Edit_playground_body *body = ; // 

PlaygroundApi *apiInstance = [[PlaygroundApi alloc] init];

// Edit the primary 'main.js' client-side JavaScript of an existing p5js playground. A static index.html file will load a canvas.html iframe which will include , and the main.js script edited herein.
[apiInstance editPlaygroundWith:body
              completionHandler: ^(inline_response_200_6 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.PlaygroundApi()
var body = ; // {{Edit_playground_body}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.editPlayground(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class editPlaygroundExample
    {
        public void main()
        {

            var apiInstance = new PlaygroundApi();
            var body = new Edit_playground_body(); // Edit_playground_body | 

            try
            {
                // Edit the primary 'main.js' client-side JavaScript of an existing p5js playground. A static index.html file will load a canvas.html iframe which will include , and the main.js script edited herein.
                inline_response_200_6 result = apiInstance.editPlayground(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlaygroundApi.editPlayground: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiPlaygroundApi();
$body = ; // Edit_playground_body | 

try {
    $result = $api_instance->editPlayground($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlaygroundApi->editPlayground: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PlaygroundApi;

my $api_instance = WWW::SwaggerClient::PlaygroundApi->new();
my $body = WWW::SwaggerClient::Object::Edit_playground_body->new(); # Edit_playground_body | 

eval { 
    my $result = $api_instance->editPlayground(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PlaygroundApi->editPlayground: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PlaygroundApi()
body =  # Edit_playground_body | 

try: 
    # Edit the primary 'main.js' client-side JavaScript of an existing p5js playground. A static index.html file will load a canvas.html iframe which will include , and the main.js script edited herein.
    api_response = api_instance.edit_playground(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PlaygroundApi->editPlayground: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - The playground edit attempt was processed, the results of which are returned in the response. It is recommended each successful source code update be summarized by reviewing **FULL** latet code source, citing line ranges.


logPlayground

This endpoint provides access to the user's output and error logs for a given playground.

Maintaining alignment with the mission to create a user-friendly and accessible interface, this endpoint provides access to the user's output and error logs for a given playground. This endpoint is intended to be used by the LLM to provide context for the user's code.


/log_playground

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/log_playground"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PlaygroundApi;

import java.io.File;
import java.util.*;

public class PlaygroundApiExample {

    public static void main(String[] args) {
        
        PlaygroundApi apiInstance = new PlaygroundApi();
        Log_playground_body body = ; // Log_playground_body | 
        try {
            inline_response_200_7 result = apiInstance.logPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlaygroundApi#logPlayground");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PlaygroundApi;

public class PlaygroundApiExample {

    public static void main(String[] args) {
        PlaygroundApi apiInstance = new PlaygroundApi();
        Log_playground_body body = ; // Log_playground_body | 
        try {
            inline_response_200_7 result = apiInstance.logPlayground(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlaygroundApi#logPlayground");
            e.printStackTrace();
        }
    }
}
Log_playground_body *body = ; // 

PlaygroundApi *apiInstance = [[PlaygroundApi alloc] init];

// This endpoint provides access to the user's output and error logs for a given playground.
[apiInstance logPlaygroundWith:body
              completionHandler: ^(inline_response_200_7 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.PlaygroundApi()
var body = ; // {{Log_playground_body}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.logPlayground(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class logPlaygroundExample
    {
        public void main()
        {

            var apiInstance = new PlaygroundApi();
            var body = new Log_playground_body(); // Log_playground_body | 

            try
            {
                // This endpoint provides access to the user's output and error logs for a given playground.
                inline_response_200_7 result = apiInstance.logPlayground(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlaygroundApi.logPlayground: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiPlaygroundApi();
$body = ; // Log_playground_body | 

try {
    $result = $api_instance->logPlayground($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlaygroundApi->logPlayground: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PlaygroundApi;

my $api_instance = WWW::SwaggerClient::PlaygroundApi->new();
my $body = WWW::SwaggerClient::Object::Log_playground_body->new(); # Log_playground_body | 

eval { 
    my $result = $api_instance->logPlayground(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PlaygroundApi->logPlayground: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PlaygroundApi()
body =  # Log_playground_body | 

try: 
    # This endpoint provides access to the user's output and error logs for a given playground.
    api_response = api_instance.log_playground(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PlaygroundApi->logPlayground: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - The playground's log was successfully queried, and a log line entered to indicate the LLM / AI Assistant last checked the log.


Promptate

promptateCaptureLead

If the user the user wants to opt-in to Code Felows academy sponsorship, this is the endpoint to intake their enrollment info.

Registers user for the Code Fellows academy promotion.


/promptate_capture_lead

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/promptate_capture_lead"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PromptateApi;

import java.io.File;
import java.util.*;

public class PromptateApiExample {

    public static void main(String[] args) {
        
        PromptateApi apiInstance = new PromptateApi();
        Promptate_capture_lead_body body = ; // Promptate_capture_lead_body | 
        try {
            inline_response_200_10 result = apiInstance.promptateCaptureLead(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PromptateApi#promptateCaptureLead");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PromptateApi;

public class PromptateApiExample {

    public static void main(String[] args) {
        PromptateApi apiInstance = new PromptateApi();
        Promptate_capture_lead_body body = ; // Promptate_capture_lead_body | 
        try {
            inline_response_200_10 result = apiInstance.promptateCaptureLead(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PromptateApi#promptateCaptureLead");
            e.printStackTrace();
        }
    }
}
Promptate_capture_lead_body *body = ; // 

PromptateApi *apiInstance = [[PromptateApi alloc] init];

// If the user the user wants to opt-in to Code Felows academy sponsorship, this is the endpoint to intake their enrollment info.
[apiInstance promptateCaptureLeadWith:body
              completionHandler: ^(inline_response_200_10 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.PromptateApi()
var body = ; // {{Promptate_capture_lead_body}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.promptateCaptureLead(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class promptateCaptureLeadExample
    {
        public void main()
        {

            var apiInstance = new PromptateApi();
            var body = new Promptate_capture_lead_body(); // Promptate_capture_lead_body | 

            try
            {
                // If the user the user wants to opt-in to Code Felows academy sponsorship, this is the endpoint to intake their enrollment info.
                inline_response_200_10 result = apiInstance.promptateCaptureLead(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PromptateApi.promptateCaptureLead: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiPromptateApi();
$body = ; // Promptate_capture_lead_body | 

try {
    $result = $api_instance->promptateCaptureLead($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PromptateApi->promptateCaptureLead: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PromptateApi;

my $api_instance = WWW::SwaggerClient::PromptateApi->new();
my $body = WWW::SwaggerClient::Object::Promptate_capture_lead_body->new(); # Promptate_capture_lead_body | 

eval { 
    my $result = $api_instance->promptateCaptureLead(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PromptateApi->promptateCaptureLead: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PromptateApi()
body =  # Promptate_capture_lead_body | 

try: 
    # If the user the user wants to opt-in to Code Felows academy sponsorship, this is the endpoint to intake their enrollment info.
    api_response = api_instance.promptate_capture_lead(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PromptateApi->promptateCaptureLead: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Successfuly enrolled.


RestAPI

restApiCall

Make a POST or GET http API call with optional headers and body. The /rest_api_call endpoint is a more advanced tool when /scrape_url can't cut it. You can send payload telling Web Requests what kind of API call to make on your behalf.


/rest_api_call

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/rest_api_call"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RestAPIApi;

import java.io.File;
import java.util.*;

public class RestAPIApiExample {

    public static void main(String[] args) {
        
        RestAPIApi apiInstance = new RestAPIApi();
        Rest_api_call_body body = ; // Rest_api_call_body | 
        try {
            inline_response_200_1 result = apiInstance.restApiCall(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RestAPIApi#restApiCall");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RestAPIApi;

public class RestAPIApiExample {

    public static void main(String[] args) {
        RestAPIApi apiInstance = new RestAPIApi();
        Rest_api_call_body body = ; // Rest_api_call_body | 
        try {
            inline_response_200_1 result = apiInstance.restApiCall(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RestAPIApi#restApiCall");
            e.printStackTrace();
        }
    }
}
Rest_api_call_body *body = ; //  (optional)

RestAPIApi *apiInstance = [[RestAPIApi alloc] init];

// Make a POST or GET http API call with optional headers and body. The /rest_api_call endpoint is a more advanced tool when /scrape_url can't cut it. You can send payload telling Web Requests what kind of API call to make on your behalf.
[apiInstance restApiCallWith:body
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.RestAPIApi()
var opts = { 
  'body':  // {{Rest_api_call_body}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.restApiCall(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class restApiCallExample
    {
        public void main()
        {

            var apiInstance = new RestAPIApi();
            var body = new Rest_api_call_body(); // Rest_api_call_body |  (optional) 

            try
            {
                // Make a POST or GET http API call with optional headers and body. The /rest_api_call endpoint is a more advanced tool when /scrape_url can't cut it. You can send payload telling Web Requests what kind of API call to make on your behalf.
                inline_response_200_1 result = apiInstance.restApiCall(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RestAPIApi.restApiCall: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRestAPIApi();
$body = ; // Rest_api_call_body | 

try {
    $result = $api_instance->restApiCall($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RestAPIApi->restApiCall: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RestAPIApi;

my $api_instance = WWW::SwaggerClient::RestAPIApi->new();
my $body = WWW::SwaggerClient::Object::Rest_api_call_body->new(); # Rest_api_call_body | 

eval { 
    my $result = $api_instance->restApiCall(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RestAPIApi->restApiCall: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RestAPIApi()
body =  # Rest_api_call_body |  (optional)

try: 
    # Make a POST or GET http API call with optional headers and body. The /rest_api_call endpoint is a more advanced tool when /scrape_url can't cut it. You can send payload telling Web Requests what kind of API call to make on your behalf.
    api_response = api_instance.rest_api_call(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestAPIApi->restApiCall: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - The HTTP status code and response body that were returned by the API request.


Scrape

scrapeUrl

Browse the web via URL to load web page, or raw text file. Including HTML, PDF, JSON, XML, CSV, images, and if provided search terms instead of a URL it will perform a Google search.

Can use the `url` property in the request body to specify a string of search terms, or specify a direct URL to query or browse when performing research.


/scrape_url

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/scrape_url"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScrapeApi;

import java.io.File;
import java.util.*;

public class ScrapeApiExample {

    public static void main(String[] args) {
        
        ScrapeApi apiInstance = new ScrapeApi();
        Scrape_url_body body = ; // Scrape_url_body | 
        try {
            inline_response_200 result = apiInstance.scrapeUrl(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScrapeApi#scrapeUrl");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScrapeApi;

public class ScrapeApiExample {

    public static void main(String[] args) {
        ScrapeApi apiInstance = new ScrapeApi();
        Scrape_url_body body = ; // Scrape_url_body | 
        try {
            inline_response_200 result = apiInstance.scrapeUrl(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScrapeApi#scrapeUrl");
            e.printStackTrace();
        }
    }
}
Scrape_url_body *body = ; //  (optional)

ScrapeApi *apiInstance = [[ScrapeApi alloc] init];

// Browse the web via URL to load web page, or raw text file. Including HTML, PDF, JSON, XML, CSV, images, and if provided search terms instead of a URL it will perform a Google search.
[apiInstance scrapeUrlWith:body
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.ScrapeApi()
var opts = { 
  'body':  // {{Scrape_url_body}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.scrapeUrl(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class scrapeUrlExample
    {
        public void main()
        {

            var apiInstance = new ScrapeApi();
            var body = new Scrape_url_body(); // Scrape_url_body |  (optional) 

            try
            {
                // Browse the web via URL to load web page, or raw text file. Including HTML, PDF, JSON, XML, CSV, images, and if provided search terms instead of a URL it will perform a Google search.
                inline_response_200 result = apiInstance.scrapeUrl(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScrapeApi.scrapeUrl: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiScrapeApi();
$body = ; // Scrape_url_body | 

try {
    $result = $api_instance->scrapeUrl($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ScrapeApi->scrapeUrl: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ScrapeApi;

my $api_instance = WWW::SwaggerClient::ScrapeApi->new();
my $body = WWW::SwaggerClient::Object::Scrape_url_body->new(); # Scrape_url_body | 

eval { 
    my $result = $api_instance->scrapeUrl(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScrapeApi->scrapeUrl: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ScrapeApi()
body =  # Scrape_url_body |  (optional)

try: 
    # Browse the web via URL to load web page, or raw text file. Including HTML, PDF, JSON, XML, CSV, images, and if provided search terms instead of a URL it will perform a Google search.
    api_response = api_instance.scrape_url(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScrapeApi->scrapeUrl: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Request returned a response. The primary focus is the 'content' property, which may contain unstructured data you need to interpret to find your user's answer, or navigate further.


Stripe

createCheckoutSession

This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!

This endpoint facilitates the payment process by creating a Stripe checkout session and returns the checkout URL. It handles payment methods, payment status, success, and cancellation URLs, and inserts the payment details into a database.


/create_checkout_session

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://plugin.wegpt.ai/create_checkout_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StripeApi;

import java.io.File;
import java.util.*;

public class StripeApiExample {

    public static void main(String[] args) {
        
        StripeApi apiInstance = new StripeApi();
        try {
            inline_response_200_3 result = apiInstance.createCheckoutSession();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StripeApi#createCheckoutSession");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StripeApi;

public class StripeApiExample {

    public static void main(String[] args) {
        StripeApi apiInstance = new StripeApi();
        try {
            inline_response_200_3 result = apiInstance.createCheckoutSession();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StripeApi#createCheckoutSession");
            e.printStackTrace();
        }
    }
}

StripeApi *apiInstance = [[StripeApi alloc] init];

// This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!
[apiInstance createCheckoutSessionWithCompletionHandler: 
              ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.StripeApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCheckoutSession(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCheckoutSessionExample
    {
        public void main()
        {

            var apiInstance = new StripeApi();

            try
            {
                // This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!
                inline_response_200_3 result = apiInstance.createCheckoutSession();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StripeApi.createCheckoutSession: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiStripeApi();

try {
    $result = $api_instance->createCheckoutSession();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StripeApi->createCheckoutSession: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StripeApi;

my $api_instance = WWW::SwaggerClient::StripeApi->new();

eval { 
    my $result = $api_instance->createCheckoutSession();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StripeApi->createCheckoutSession: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StripeApi()

try: 
    # This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!
    api_response = api_instance.create_checkout_session()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StripeApi->createCheckoutSession: %s\n" % e)

Parameters

Responses

Status: 200 - The checkout session was successfully created, and the URL and instructions are provided.


System

getSystemMessage

This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.

System messages help the AI assistant fulfill the optimal user experience by providing important context for the environment, news about important system updates to Web Requests. System messages are meant to be read by the AI assistant, without input or requisite knowledge by the user.


/get_system_message

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://plugin.wegpt.ai/get_system_message"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        
        SystemApi apiInstance = new SystemApi();
        try {
            inline_response_200_8 result = apiInstance.getSystemMessage();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getSystemMessage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        try {
            inline_response_200_8 result = apiInstance.getSystemMessage();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getSystemMessage");
            e.printStackTrace();
        }
    }
}

SystemApi *apiInstance = [[SystemApi alloc] init];

// This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.
[apiInstance getSystemMessageWithCompletionHandler: 
              ^(inline_response_200_8 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.SystemApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSystemMessage(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSystemMessageExample
    {
        public void main()
        {

            var apiInstance = new SystemApi();

            try
            {
                // This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.
                inline_response_200_8 result = apiInstance.getSystemMessage();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.getSystemMessage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSystemApi();

try {
    $result = $api_instance->getSystemMessage();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSystemMessage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;

my $api_instance = WWW::SwaggerClient::SystemApi->new();

eval { 
    my $result = $api_instance->getSystemMessage();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->getSystemMessage: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SystemApi()

try: 
    # This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.
    api_response = api_instance.get_system_message()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->getSystemMessage: %s\n" % e)

Parameters

Responses

Status: 200 - Retrieved a system message for the user.

Status: 204 - No system messages are available for the user at this time.

Status: 400 - The request was malformed.


Transaction

createCheckoutSession

This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!

This endpoint facilitates the payment process by creating a Stripe checkout session and returns the checkout URL. It handles payment methods, payment status, success, and cancellation URLs, and inserts the payment details into a database.


/create_checkout_session

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://plugin.wegpt.ai/create_checkout_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TransactionApi;

import java.io.File;
import java.util.*;

public class TransactionApiExample {

    public static void main(String[] args) {
        
        TransactionApi apiInstance = new TransactionApi();
        try {
            inline_response_200_3 result = apiInstance.createCheckoutSession();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionApi#createCheckoutSession");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TransactionApi;

public class TransactionApiExample {

    public static void main(String[] args) {
        TransactionApi apiInstance = new TransactionApi();
        try {
            inline_response_200_3 result = apiInstance.createCheckoutSession();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionApi#createCheckoutSession");
            e.printStackTrace();
        }
    }
}

TransactionApi *apiInstance = [[TransactionApi alloc] init];

// This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!
[apiInstance createCheckoutSessionWithCompletionHandler: 
              ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.TransactionApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCheckoutSession(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCheckoutSessionExample
    {
        public void main()
        {

            var apiInstance = new TransactionApi();

            try
            {
                // This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!
                inline_response_200_3 result = apiInstance.createCheckoutSession();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TransactionApi.createCheckoutSession: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTransactionApi();

try {
    $result = $api_instance->createCheckoutSession();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TransactionApi->createCheckoutSession: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TransactionApi;

my $api_instance = WWW::SwaggerClient::TransactionApi->new();

eval { 
    my $result = $api_instance->createCheckoutSession();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TransactionApi->createCheckoutSession: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TransactionApi()

try: 
    # This endpoint initiates the creation of a Stripe checkout session and is how you can buy premium Web Requests Pro features!
    api_response = api_instance.create_checkout_session()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TransactionApi->createCheckoutSession: %s\n" % e)

Parameters

Responses

Status: 200 - The checkout session was successfully created, and the URL and instructions are provided.


Unread

getSystemMessage

This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.

System messages help the AI assistant fulfill the optimal user experience by providing important context for the environment, news about important system updates to Web Requests. System messages are meant to be read by the AI assistant, without input or requisite knowledge by the user.


/get_system_message

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://plugin.wegpt.ai/get_system_message"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UnreadApi;

import java.io.File;
import java.util.*;

public class UnreadApiExample {

    public static void main(String[] args) {
        
        UnreadApi apiInstance = new UnreadApi();
        try {
            inline_response_200_8 result = apiInstance.getSystemMessage();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UnreadApi#getSystemMessage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UnreadApi;

public class UnreadApiExample {

    public static void main(String[] args) {
        UnreadApi apiInstance = new UnreadApi();
        try {
            inline_response_200_8 result = apiInstance.getSystemMessage();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UnreadApi#getSystemMessage");
            e.printStackTrace();
        }
    }
}

UnreadApi *apiInstance = [[UnreadApi alloc] init];

// This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.
[apiInstance getSystemMessageWithCompletionHandler: 
              ^(inline_response_200_8 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.UnreadApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSystemMessage(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSystemMessageExample
    {
        public void main()
        {

            var apiInstance = new UnreadApi();

            try
            {
                // This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.
                inline_response_200_8 result = apiInstance.getSystemMessage();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UnreadApi.getSystemMessage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUnreadApi();

try {
    $result = $api_instance->getSystemMessage();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UnreadApi->getSystemMessage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UnreadApi;

my $api_instance = WWW::SwaggerClient::UnreadApi->new();

eval { 
    my $result = $api_instance->getSystemMessage();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UnreadApi->getSystemMessage: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UnreadApi()

try: 
    # This endpoint retrieves **important** system messages for the user, and should be called whenever 'unread_system_message' is 'true' in another web_request response.
    api_response = api_instance.get_system_message()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UnreadApi->getSystemMessage: %s\n" % e)

Parameters

Responses

Status: 200 - Retrieved a system message for the user.

Status: 204 - No system messages are available for the user at this time.

Status: 400 - The request was malformed.


Wallet

getWalletProfile

Retrieve a comprehensive summary of an Ethereum wallet's key stats using the Etherscan API. User must provide their own API Key, it can be found in their Account Settings on Etherscan.io -- it's FREE!


/get_wallet_profile

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/get_wallet_profile"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WalletApi;

import java.io.File;
import java.util.*;

public class WalletApiExample {

    public static void main(String[] args) {
        
        WalletApi apiInstance = new WalletApi();
        Get_wallet_profile_body body = ; // Get_wallet_profile_body | Etherscan API key and Ethereum address are required. Optional req_id and chunk for pagination.
        try {
            inline_response_200_4 result = apiInstance.getWalletProfile(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WalletApi#getWalletProfile");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WalletApi;

public class WalletApiExample {

    public static void main(String[] args) {
        WalletApi apiInstance = new WalletApi();
        Get_wallet_profile_body body = ; // Get_wallet_profile_body | Etherscan API key and Ethereum address are required. Optional req_id and chunk for pagination.
        try {
            inline_response_200_4 result = apiInstance.getWalletProfile(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WalletApi#getWalletProfile");
            e.printStackTrace();
        }
    }
}
Get_wallet_profile_body *body = ; // Etherscan API key and Ethereum address are required. Optional req_id and chunk for pagination.

WalletApi *apiInstance = [[WalletApi alloc] init];

// Retrieve a comprehensive summary of an Ethereum wallet's key stats using the Etherscan API. User must provide their own API Key, it can be found in their Account Settings on Etherscan.io -- it's FREE!
[apiInstance getWalletProfileWith:body
              completionHandler: ^(inline_response_200_4 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.WalletApi()
var body = ; // {{Get_wallet_profile_body}} Etherscan API key and Ethereum address are required. Optional req_id and chunk for pagination.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getWalletProfile(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getWalletProfileExample
    {
        public void main()
        {

            var apiInstance = new WalletApi();
            var body = new Get_wallet_profile_body(); // Get_wallet_profile_body | Etherscan API key and Ethereum address are required. Optional req_id and chunk for pagination.

            try
            {
                // Retrieve a comprehensive summary of an Ethereum wallet's key stats using the Etherscan API. User must provide their own API Key, it can be found in their Account Settings on Etherscan.io -- it's FREE!
                inline_response_200_4 result = apiInstance.getWalletProfile(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WalletApi.getWalletProfile: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiWalletApi();
$body = ; // Get_wallet_profile_body | Etherscan API key and Ethereum address are required. Optional req_id and chunk for pagination.

try {
    $result = $api_instance->getWalletProfile($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WalletApi->getWalletProfile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WalletApi;

my $api_instance = WWW::SwaggerClient::WalletApi->new();
my $body = WWW::SwaggerClient::Object::Get_wallet_profile_body->new(); # Get_wallet_profile_body | Etherscan API key and Ethereum address are required. Optional req_id and chunk for pagination.

eval { 
    my $result = $api_instance->getWalletProfile(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WalletApi->getWalletProfile: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.WalletApi()
body =  # Get_wallet_profile_body | Etherscan API key and Ethereum address are required. Optional req_id and chunk for pagination.

try: 
    # Retrieve a comprehensive summary of an Ethereum wallet's key stats using the Etherscan API. User must provide their own API Key, it can be found in their Account Settings on Etherscan.io -- it's FREE!
    api_response = api_instance.get_wallet_profile(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WalletApi->getWalletProfile: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - The profile / summary data of the specified Ethereum wallet. You can either work with the data, or print a formatted summary report for the user.


WebBrowser

scrapeUrl

Browse the web via URL to load web page, or raw text file. Including HTML, PDF, JSON, XML, CSV, images, and if provided search terms instead of a URL it will perform a Google search.

Can use the `url` property in the request body to specify a string of search terms, or specify a direct URL to query or browse when performing research.


/scrape_url

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://plugin.wegpt.ai/scrape_url"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WebBrowserApi;

import java.io.File;
import java.util.*;

public class WebBrowserApiExample {

    public static void main(String[] args) {
        
        WebBrowserApi apiInstance = new WebBrowserApi();
        Scrape_url_body body = ; // Scrape_url_body | 
        try {
            inline_response_200 result = apiInstance.scrapeUrl(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WebBrowserApi#scrapeUrl");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WebBrowserApi;

public class WebBrowserApiExample {

    public static void main(String[] args) {
        WebBrowserApi apiInstance = new WebBrowserApi();
        Scrape_url_body body = ; // Scrape_url_body | 
        try {
            inline_response_200 result = apiInstance.scrapeUrl(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WebBrowserApi#scrapeUrl");
            e.printStackTrace();
        }
    }
}
Scrape_url_body *body = ; //  (optional)

WebBrowserApi *apiInstance = [[WebBrowserApi alloc] init];

// Browse the web via URL to load web page, or raw text file. Including HTML, PDF, JSON, XML, CSV, images, and if provided search terms instead of a URL it will perform a Google search.
[apiInstance scrapeUrlWith:body
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WebRequests = require('web_requests');

var api = new WebRequests.WebBrowserApi()
var opts = { 
  'body':  // {{Scrape_url_body}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.scrapeUrl(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class scrapeUrlExample
    {
        public void main()
        {

            var apiInstance = new WebBrowserApi();
            var body = new Scrape_url_body(); // Scrape_url_body |  (optional) 

            try
            {
                // Browse the web via URL to load web page, or raw text file. Including HTML, PDF, JSON, XML, CSV, images, and if provided search terms instead of a URL it will perform a Google search.
                inline_response_200 result = apiInstance.scrapeUrl(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebBrowserApi.scrapeUrl: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiWebBrowserApi();
$body = ; // Scrape_url_body | 

try {
    $result = $api_instance->scrapeUrl($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WebBrowserApi->scrapeUrl: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WebBrowserApi;

my $api_instance = WWW::SwaggerClient::WebBrowserApi->new();
my $body = WWW::SwaggerClient::Object::Scrape_url_body->new(); # Scrape_url_body | 

eval { 
    my $result = $api_instance->scrapeUrl(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebBrowserApi->scrapeUrl: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.WebBrowserApi()
body =  # Scrape_url_body |  (optional)

try: 
    # Browse the web via URL to load web page, or raw text file. Including HTML, PDF, JSON, XML, CSV, images, and if provided search terms instead of a URL it will perform a Google search.
    api_response = api_instance.scrape_url(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebBrowserApi->scrapeUrl: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Request returned a response. The primary focus is the 'content' property, which may contain unstructured data you need to interpret to find your user's answer, or navigate further.