NAV
Bash Python Ruby Javascript CSharp
  • Introduction
  • Authentication
  • Image Recognition APIs
  • Text Analysis APIs
  • Introduction

    Welcome to the DeepAI API!

    Authentication

    Pass your API key in a header called "api-key".

    Image Recognition APIs

    Nudity Detection

    # Example posting a image URL:
    
    curl \
        -F 'image=YOUR_IMAGE_URL' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/nsfw-detector 
    
    
    # Example posting a local image file:
    
    curl \
        -F 'image=@/path/to/your/file.jpg' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/nsfw-detector 
    
    
    
    
    # Example posting a image URL:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/nsfw-detector', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'image' => 'YOUR_IMAGE_URL',
        }
    )
    puts r
    
    
    # Example posting a local image file:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/nsfw-detector', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'image' => File.new('/path/to/your/file.jpg'),
        }
    )
    puts r
    
    
    
    
    # Example posting a image URL:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/nsfw-detector",
        data={
            'image': 'YOUR_IMAGE_URL',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example posting a local image file:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/nsfw-detector",
        files={
            'image': open('/path/to/your/file.jpg', 'rb'),
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    
    
    
    // Get the 'deepai' package here (Compatible with browser & nodejs):
    //     https://www.npmjs.com/package/deepai
    // All examples use JS async-await syntax, be sure to call the API inside an async function.
    //     Learn more about async-await here: https://javascript.info/async-await
    
    // Example posting a image URL:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("nsfw-detector", {
                image: "YOUR_IMAGE_URL",
        });
        console.log(resp);
    })()
    
    
    // Example posting file picker input image (Browser only):
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("nsfw-detector", {
                image: document.getElementById('yourFileInputId'),
        });
        console.log(resp);
    })()
    
    
    // Example posting a local image file (Node.js only):
    const fs = require('fs');
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("nsfw-detector", {
                image: fs.createReadStream("/path/to/your/file.jpg"),
        });
        console.log(resp);
    })()
    
    
    
    
    
    // Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
    // Example posting a image URL:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("nsfw-detector", new {
            image = "YOUR_IMAGE_URL",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example posting a local image file:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("nsfw-detector", new {
            image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    
    

    Detects the likelihood that an image contains nudity and should be considered NSFW. Returns a number between 0 and 1, with 1 being 100% likely to contain nudity and be NSFW.

    HTTP Request

    POST https://api.deepai.org/api/nsfw-detector

    Headers

    Parameter Default Description
    Api-Key null Your production API Key.

    Form Fields

    Name Type Description
    image image The image url or file upload that you want processed

    Response Data

    Parameter value Description
    nsfw_score decimal Percentage confidence that the image contains nudity, 1 being 100% confident.

    Waifu2x

    # Example posting a image URL:
    
    curl \
        -F 'image=YOUR_IMAGE_URL' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/waifu2x 
    
    
    # Example posting a local image file:
    
    curl \
        -F 'image=@/path/to/your/file.jpg' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/waifu2x 
    
    
    
    
    # Example posting a image URL:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/waifu2x', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'image' => 'YOUR_IMAGE_URL',
        }
    )
    puts r
    
    
    # Example posting a local image file:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/waifu2x', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'image' => File.new('/path/to/your/file.jpg'),
        }
    )
    puts r
    
    
    
    
    # Example posting a image URL:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/waifu2x",
        data={
            'image': 'YOUR_IMAGE_URL',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example posting a local image file:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/waifu2x",
        files={
            'image': open('/path/to/your/file.jpg', 'rb'),
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    
    
    
    // Get the 'deepai' package here (Compatible with browser & nodejs):
    //     https://www.npmjs.com/package/deepai
    // All examples use JS async-await syntax, be sure to call the API inside an async function.
    //     Learn more about async-await here: https://javascript.info/async-await
    
    // Example posting a image URL:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("waifu2x", {
                image: "YOUR_IMAGE_URL",
        });
        console.log(resp);
    })()
    
    
    // Example posting file picker input image (Browser only):
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("waifu2x", {
                image: document.getElementById('yourFileInputId'),
        });
        console.log(resp);
    })()
    
    
    // Example posting a local image file (Node.js only):
    const fs = require('fs');
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("waifu2x", {
                image: fs.createReadStream("/path/to/your/file.jpg"),
        });
        console.log(resp);
    })()
    
    
    
    
    
    // Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
    // Example posting a image URL:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("waifu2x", new {
            image = "YOUR_IMAGE_URL",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example posting a local image file:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("waifu2x", new {
            image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    
    

    The above command returns JSON structured like this:

    {
        "output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
    }
    

    Waifu2x is an algorithm that upscales images while reducing noise within the image. It gets its name from the anime-style art known as 'waifu' that it was largely trained on. Even though waifus made up most of the training data, this waifu2x api still performs well on photographs and other types of imagery. You can use Waifu2x to double the size of your images while reducing noise.

    HTTP Request

    POST https://api.deepai.org/api/waifu2x

    Headers

    Parameter Default Description
    Api-Key null Your production API Key.

    Form Fields

    Name Type Description
    image image The image url or file upload that you want processed

    Response Data

    Parameter value Description
    output_url url The url of the processed image.

    Image Similarity

    # Example posting a image URL:
    
    curl \
        -F 'image1=YOUR_IMAGE_URL' \
        -F 'image2=YOUR_IMAGE_URL' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/image-similarity 
    
    
    # Example posting a local image file:
    
    curl \
        -F 'image1=@/path/to/your/file.jpg' \
        -F 'image2=@/path/to/your/file.jpg' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/image-similarity 
    
    
    
    
    # Example posting a image URL:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/image-similarity', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'image1' => 'YOUR_IMAGE_URL',
            'image2' => 'YOUR_IMAGE_URL',
        }
    )
    puts r
    
    
    # Example posting a local image file:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/image-similarity', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'image1' => File.new('/path/to/your/file.jpg'),
            'image2' => File.new('/path/to/your/file.jpg'),
        }
    )
    puts r
    
    
    
    
    # Example posting a image URL:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/image-similarity",
        data={
            'image1': 'YOUR_IMAGE_URL',
            'image2': 'YOUR_IMAGE_URL',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example posting a local image file:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/image-similarity",
        files={
            'image1': open('/path/to/your/file.jpg', 'rb'),
            'image2': open('/path/to/your/file.jpg', 'rb'),
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    
    
    
    // Get the 'deepai' package here (Compatible with browser & nodejs):
    //     https://www.npmjs.com/package/deepai
    // All examples use JS async-await syntax, be sure to call the API inside an async function.
    //     Learn more about async-await here: https://javascript.info/async-await
    
    // Example posting a image URL:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("image-similarity", {
                image1: "YOUR_IMAGE_URL",
                image2: "YOUR_IMAGE_URL",
        });
        console.log(resp);
    })()
    
    
    // Example posting file picker input image (Browser only):
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("image-similarity", {
                image1: document.getElementById('yourFileInputId'),
                image2: document.getElementById('yourFileInputId'),
        });
        console.log(resp);
    })()
    
    
    // Example posting a local image file (Node.js only):
    const fs = require('fs');
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("image-similarity", {
                image1: fs.createReadStream("/path/to/your/file.jpg"),
                image2: fs.createReadStream("/path/to/your/file.jpg"),
        });
        console.log(resp);
    })()
    
    
    
    
    
    // Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
    // Example posting a image URL:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("image-similarity", new {
            image1 = "YOUR_IMAGE_URL",
            image2 = "YOUR_IMAGE_URL",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example posting a local image file:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("image-similarity", new {
            image1 = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
            image2 = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    
    

    Image Similarity compares two images and returns a value that tells you how visually similar they are. The lower the the score, the more contextually similar the two images are with a score of '0' being identical. Sifting through datasets looking for duplicates or finding a visually similar set of images can be painful - so let computer vision do it for you with this API.

    HTTP Request

    POST https://api.deepai.org/api/image-similarity

    Headers

    Parameter Default Description
    Api-Key null Your production API Key.

    Form Fields

    Name Type Description
    image1 image The image url or file upload of the first image to compare
    image2 image The image url or file upload of the second image to compare

    Response Data

    Parameter value Description
    distance number the amount of disimilarity the two images have relative to one another. A distance of 0 means the two images are identical.

    Text To Image

    # Example posting a text URL:
    
    curl \
        -F 'text=YOUR_TEXT_URL' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/text2img 
    
    
    # Example posting a local text file:
    
    curl \
        -F 'text=@/path/to/your/file.txt' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/text2img 
    
    
    # Example directly sending a text string:
    
    curl \
        -F 'text=YOUR_TEXT_HERE' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/text2img 
    
    
    
    
    # Example posting a text URL:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/text2img', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'text' => 'YOUR_TEXT_URL',
        }
    )
    puts r
    
    
    # Example posting a local text file:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/text2img', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'text' => File.new('/path/to/your/file.txt'),
        }
    )
    puts r
    
    
    # Example directly sending a text string:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/text2img', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'text' => 'YOUR_TEXT_HERE',
        }
    )
    puts r
    
    
    
    
    # Example posting a text URL:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/text2img",
        data={
            'text': 'YOUR_TEXT_URL',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example posting a local text file:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/text2img",
        files={
            'text': open('/path/to/your/file.txt', 'rb'),
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example directly sending a text string:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/text2img",
        data={
            'text': 'YOUR_TEXT_HERE',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    
    
    
    // Get the 'deepai' package here (Compatible with browser & nodejs):
    //     https://www.npmjs.com/package/deepai
    // All examples use JS async-await syntax, be sure to call the API inside an async function.
    //     Learn more about async-await here: https://javascript.info/async-await
    
    // Example posting a text URL:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("text2img", {
                text: "YOUR_TEXT_URL",
        });
        console.log(resp);
    })()
    
    
    // Example posting file picker input text (Browser only):
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("text2img", {
                text: document.getElementById('yourFileInputId'),
        });
        console.log(resp);
    })()
    
    
    // Example posting a local text file (Node.js only):
    const fs = require('fs');
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("text2img", {
                text: fs.createReadStream("/path/to/your/file.txt"),
        });
        console.log(resp);
    })()
    
    
    // Example directly sending a text string:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("text2img", {
                text: "YOUR_TEXT_HERE",
        });
        console.log(resp);
    })()
    
    
    
    
    
    // Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
    // Example posting a text URL:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("text2img", new {
            text = "YOUR_TEXT_URL",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example posting a local text file:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("text2img", new {
            text = File.OpenRead("C:\\path\\to\\your\\file.txt"),
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example directly sending a text string:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("text2img", new {
            text = "YOUR_TEXT_HERE",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    
    

    The above command returns JSON structured like this:

    {
        "output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
    }
    

    Creates an image from scratch from a text description.

    Yes, this is the one you've been waiting for. Text-to-image uses AI to understand your words and convert them to a unique image each time. Like magic.

    This can be used to generate art, or for general silliness.

    Don't expect the quality to be photorealistic, however. You would need a really really big AI to do that, and have you priced those lately?

    If you can't think of something, try "Balloon in the shape of X" where X is something you wouldn't find in balloon form.

    HTTP Request

    POST https://api.deepai.org/api/text2img

    Headers

    Parameter Default Description
    Api-Key null Your production API Key.

    Form Fields

    Name Type Description
    text text Enter a word or two

    Response Data

    Parameter Default Description
    output_url null The image url of the processed image.

    Image Colorization

    # Example posting a image URL:
    
    curl \
        -F 'image=YOUR_IMAGE_URL' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/colorizer 
    
    
    # Example posting a local image file:
    
    curl \
        -F 'image=@/path/to/your/file.jpg' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/colorizer 
    
    
    
    
    # Example posting a image URL:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/colorizer', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'image' => 'YOUR_IMAGE_URL',
        }
    )
    puts r
    
    
    # Example posting a local image file:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/colorizer', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'image' => File.new('/path/to/your/file.jpg'),
        }
    )
    puts r
    
    
    
    
    # Example posting a image URL:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/colorizer",
        data={
            'image': 'YOUR_IMAGE_URL',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example posting a local image file:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/colorizer",
        files={
            'image': open('/path/to/your/file.jpg', 'rb'),
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    
    
    
    // Get the 'deepai' package here (Compatible with browser & nodejs):
    //     https://www.npmjs.com/package/deepai
    // All examples use JS async-await syntax, be sure to call the API inside an async function.
    //     Learn more about async-await here: https://javascript.info/async-await
    
    // Example posting a image URL:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("colorizer", {
                image: "YOUR_IMAGE_URL",
        });
        console.log(resp);
    })()
    
    
    // Example posting file picker input image (Browser only):
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("colorizer", {
                image: document.getElementById('yourFileInputId'),
        });
        console.log(resp);
    })()
    
    
    // Example posting a local image file (Node.js only):
    const fs = require('fs');
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("colorizer", {
                image: fs.createReadStream("/path/to/your/file.jpg"),
        });
        console.log(resp);
    })()
    
    
    
    
    
    // Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
    // Example posting a image URL:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("colorizer", new {
            image = "YOUR_IMAGE_URL",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example posting a local image file:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("colorizer", new {
            image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    
    

    The above command returns JSON structured like this:

    {
        "output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
    }
    

    Colorize black and white images or videos using the image colorization API. Add color to old family photos and historic images, or bring an old film back to life with colorization.

    HTTP Request

    POST https://api.deepai.org/api/colorizer

    Headers

    Parameter Default Description
    Api-Key null Your production API Key.

    Form Fields

    Name Type Description
    image image The image url or file upload that you want processed

    Response Data

    Parameter Default Description
    output_url null The image url of the processed image.

    Neural Style

    # Example posting a image URL:
    
    curl \
        -F 'style=YOUR_IMAGE_URL' \
        -F 'content=YOUR_IMAGE_URL' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/neural-style 
    
    
    # Example posting a local image file:
    
    curl \
        -F 'style=@/path/to/your/file.jpg' \
        -F 'content=@/path/to/your/file.jpg' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/neural-style 
    
    
    
    
    # Example posting a image URL:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/neural-style', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'style' => 'YOUR_IMAGE_URL',
            'content' => 'YOUR_IMAGE_URL',
        }
    )
    puts r
    
    
    # Example posting a local image file:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/neural-style', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'style' => File.new('/path/to/your/file.jpg'),
            'content' => File.new('/path/to/your/file.jpg'),
        }
    )
    puts r
    
    
    
    
    # Example posting a image URL:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/neural-style",
        data={
            'style': 'YOUR_IMAGE_URL',
            'content': 'YOUR_IMAGE_URL',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example posting a local image file:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/neural-style",
        files={
            'style': open('/path/to/your/file.jpg', 'rb'),
            'content': open('/path/to/your/file.jpg', 'rb'),
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    
    
    
    // Get the 'deepai' package here (Compatible with browser & nodejs):
    //     https://www.npmjs.com/package/deepai
    // All examples use JS async-await syntax, be sure to call the API inside an async function.
    //     Learn more about async-await here: https://javascript.info/async-await
    
    // Example posting a image URL:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("neural-style", {
                style: "YOUR_IMAGE_URL",
                content: "YOUR_IMAGE_URL",
        });
        console.log(resp);
    })()
    
    
    // Example posting file picker input image (Browser only):
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("neural-style", {
                style: document.getElementById('yourFileInputId'),
                content: document.getElementById('yourFileInputId'),
        });
        console.log(resp);
    })()
    
    
    // Example posting a local image file (Node.js only):
    const fs = require('fs');
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("neural-style", {
                style: fs.createReadStream("/path/to/your/file.jpg"),
                content: fs.createReadStream("/path/to/your/file.jpg"),
        });
        console.log(resp);
    })()
    
    
    
    
    
    // Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
    // Example posting a image URL:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("neural-style", new {
            style = "YOUR_IMAGE_URL",
            content = "YOUR_IMAGE_URL",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example posting a local image file:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("neural-style", new {
            style = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
            content = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    
    

    The above command returns JSON structured like this:

    {
        "output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
    }
    

    Transfers the style from one image onto the content of another image.

    HTTP Request

    POST https://api.deepai.org/api/neural-style

    Headers

    Parameter Default Description
    Api-Key null Your production API Key.

    Form Fields

    Name Type Description
    content image The image url or file upload to provide the content
    style image The image url or file upload to provide the style

    Response Data

    Parameter Default Description
    output_url null The image url of the processed image.

    Super Resolution

    # Example posting a image URL:
    
    curl \
        -F 'image=YOUR_IMAGE_URL' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/torch-srgan 
    
    
    # Example posting a local image file:
    
    curl \
        -F 'image=@/path/to/your/file.jpg' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/torch-srgan 
    
    
    
    
    # Example posting a image URL:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/torch-srgan', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'image' => 'YOUR_IMAGE_URL',
        }
    )
    puts r
    
    
    # Example posting a local image file:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/torch-srgan', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'image' => File.new('/path/to/your/file.jpg'),
        }
    )
    puts r
    
    
    
    
    # Example posting a image URL:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/torch-srgan",
        data={
            'image': 'YOUR_IMAGE_URL',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example posting a local image file:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/torch-srgan",
        files={
            'image': open('/path/to/your/file.jpg', 'rb'),
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    
    
    
    // Get the 'deepai' package here (Compatible with browser & nodejs):
    //     https://www.npmjs.com/package/deepai
    // All examples use JS async-await syntax, be sure to call the API inside an async function.
    //     Learn more about async-await here: https://javascript.info/async-await
    
    // Example posting a image URL:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("torch-srgan", {
                image: "YOUR_IMAGE_URL",
        });
        console.log(resp);
    })()
    
    
    // Example posting file picker input image (Browser only):
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("torch-srgan", {
                image: document.getElementById('yourFileInputId'),
        });
        console.log(resp);
    })()
    
    
    // Example posting a local image file (Node.js only):
    const fs = require('fs');
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("torch-srgan", {
                image: fs.createReadStream("/path/to/your/file.jpg"),
        });
        console.log(resp);
    })()
    
    
    
    
    
    // Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
    // Example posting a image URL:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("torch-srgan", new {
            image = "YOUR_IMAGE_URL",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example posting a local image file:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("torch-srgan", new {
            image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    
    

    The above command returns JSON structured like this:

    {
        "output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
    }
    

    The Super Resolution API uses machine learning to clarify, sharpen, and upscale the photo without losing its content and defining characteristics. Blurry images are unfortunately common and are a problem for professionals and hobbyists alike. Super resolution uses machine learning techniques to upscale images in a fraction of a second.

    HTTP Request

    POST https://api.deepai.org/api/torch-srgan

    Headers

    Parameter Default Description
    Api-Key null Your production API Key.

    Form Fields

    Name Type Description
    image image The image url or file upload that you want processed

    Response Data

    Parameter Default Description
    output_url null The image url of the processed image.

    Deep Dream

    # Example posting a image URL:
    
    curl \
        -F 'image=YOUR_IMAGE_URL' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/deepdream 
    
    
    # Example posting a local image file:
    
    curl \
        -F 'image=@/path/to/your/file.jpg' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/deepdream 
    
    
    
    
    # Example posting a image URL:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/deepdream', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'image' => 'YOUR_IMAGE_URL',
        }
    )
    puts r
    
    
    # Example posting a local image file:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/deepdream', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'image' => File.new('/path/to/your/file.jpg'),
        }
    )
    puts r
    
    
    
    
    # Example posting a image URL:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/deepdream",
        data={
            'image': 'YOUR_IMAGE_URL',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example posting a local image file:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/deepdream",
        files={
            'image': open('/path/to/your/file.jpg', 'rb'),
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    
    
    
    // Get the 'deepai' package here (Compatible with browser & nodejs):
    //     https://www.npmjs.com/package/deepai
    // All examples use JS async-await syntax, be sure to call the API inside an async function.
    //     Learn more about async-await here: https://javascript.info/async-await
    
    // Example posting a image URL:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("deepdream", {
                image: "YOUR_IMAGE_URL",
        });
        console.log(resp);
    })()
    
    
    // Example posting file picker input image (Browser only):
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("deepdream", {
                image: document.getElementById('yourFileInputId'),
        });
        console.log(resp);
    })()
    
    
    // Example posting a local image file (Node.js only):
    const fs = require('fs');
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("deepdream", {
                image: fs.createReadStream("/path/to/your/file.jpg"),
        });
        console.log(resp);
    })()
    
    
    
    
    
    // Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
    // Example posting a image URL:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("deepdream", new {
            image = "YOUR_IMAGE_URL",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example posting a local image file:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("deepdream", new {
            image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    
    

    The above command returns JSON structured like this:

    {
        "output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
    }
    

    Exaggerates feature attributes or textures using information that the bvlc_googlenet model learned during training.

    HTTP Request

    POST https://api.deepai.org/api/deepdream

    Headers

    Parameter Default Description
    Api-Key null Your production API Key.

    Form Fields

    Name Type Description
    image image The image url or file upload to provide the content

    Response Data

    Parameter Default Description
    output_url null The image url of the processed image.

    Text Analysis APIs

    Sentiment Analysis

    # Example posting a text URL:
    
    curl \
        -F 'text=YOUR_TEXT_URL' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/sentiment-analysis 
    
    
    # Example posting a local text file:
    
    curl \
        -F 'text=@/path/to/your/file.txt' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/sentiment-analysis 
    
    
    # Example directly sending a text string:
    
    curl \
        -F 'text=YOUR_TEXT_HERE' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/sentiment-analysis 
    
    
    
    
    # Example posting a text URL:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/sentiment-analysis', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'text' => 'YOUR_TEXT_URL',
        }
    )
    puts r
    
    
    # Example posting a local text file:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/sentiment-analysis', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'text' => File.new('/path/to/your/file.txt'),
        }
    )
    puts r
    
    
    # Example directly sending a text string:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/sentiment-analysis', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'text' => 'YOUR_TEXT_HERE',
        }
    )
    puts r
    
    
    
    
    # Example posting a text URL:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/sentiment-analysis",
        data={
            'text': 'YOUR_TEXT_URL',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example posting a local text file:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/sentiment-analysis",
        files={
            'text': open('/path/to/your/file.txt', 'rb'),
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example directly sending a text string:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/sentiment-analysis",
        data={
            'text': 'YOUR_TEXT_HERE',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    
    
    
    // Get the 'deepai' package here (Compatible with browser & nodejs):
    //     https://www.npmjs.com/package/deepai
    // All examples use JS async-await syntax, be sure to call the API inside an async function.
    //     Learn more about async-await here: https://javascript.info/async-await
    
    // Example posting a text URL:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("sentiment-analysis", {
                text: "YOUR_TEXT_URL",
        });
        console.log(resp);
    })()
    
    
    // Example posting file picker input text (Browser only):
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("sentiment-analysis", {
                text: document.getElementById('yourFileInputId'),
        });
        console.log(resp);
    })()
    
    
    // Example posting a local text file (Node.js only):
    const fs = require('fs');
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("sentiment-analysis", {
                text: fs.createReadStream("/path/to/your/file.txt"),
        });
        console.log(resp);
    })()
    
    
    // Example directly sending a text string:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("sentiment-analysis", {
                text: "YOUR_TEXT_HERE",
        });
        console.log(resp);
    })()
    
    
    
    
    
    // Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
    // Example posting a text URL:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("sentiment-analysis", new {
            text = "YOUR_TEXT_URL",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example posting a local text file:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("sentiment-analysis", new {
            text = File.OpenRead("C:\\path\\to\\your\\file.txt"),
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example directly sending a text string:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("sentiment-analysis", new {
            text = "YOUR_TEXT_HERE",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    
    

    This sentiment analysis API extracts sentiment in a given string of text. Sentiment analysis, also called 'opinion mining', uses natural language processing, text analysis and computational linguistics to identify and detect subjective information from the input text. This algorithm classifies each sentence in the input as very negative, negative, neutral, positive, or very positive.

    HTTP Request

    POST https://api.deepai.org/api/sentiment-analysis

    Headers

    Parameter Default Description
    Api-Key null Your production API Key.

    Form Fields

    Name Type Description
    text text Enter one or more sentences:

    Text Summarization

    # Example posting a text URL:
    
    curl \
        -F 'text=YOUR_TEXT_URL' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/summarization 
    
    
    # Example posting a local text file:
    
    curl \
        -F 'text=@/path/to/your/file.txt' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/summarization 
    
    
    # Example directly sending a text string:
    
    curl \
        -F 'text=YOUR_TEXT_HERE' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/summarization 
    
    
    
    
    # Example posting a text URL:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/summarization', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'text' => 'YOUR_TEXT_URL',
        }
    )
    puts r
    
    
    # Example posting a local text file:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/summarization', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'text' => File.new('/path/to/your/file.txt'),
        }
    )
    puts r
    
    
    # Example directly sending a text string:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/summarization', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'text' => 'YOUR_TEXT_HERE',
        }
    )
    puts r
    
    
    
    
    # Example posting a text URL:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/summarization",
        data={
            'text': 'YOUR_TEXT_URL',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example posting a local text file:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/summarization",
        files={
            'text': open('/path/to/your/file.txt', 'rb'),
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example directly sending a text string:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/summarization",
        data={
            'text': 'YOUR_TEXT_HERE',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    
    
    
    // Get the 'deepai' package here (Compatible with browser & nodejs):
    //     https://www.npmjs.com/package/deepai
    // All examples use JS async-await syntax, be sure to call the API inside an async function.
    //     Learn more about async-await here: https://javascript.info/async-await
    
    // Example posting a text URL:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("summarization", {
                text: "YOUR_TEXT_URL",
        });
        console.log(resp);
    })()
    
    
    // Example posting file picker input text (Browser only):
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("summarization", {
                text: document.getElementById('yourFileInputId'),
        });
        console.log(resp);
    })()
    
    
    // Example posting a local text file (Node.js only):
    const fs = require('fs');
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("summarization", {
                text: fs.createReadStream("/path/to/your/file.txt"),
        });
        console.log(resp);
    })()
    
    
    // Example directly sending a text string:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("summarization", {
                text: "YOUR_TEXT_HERE",
        });
        console.log(resp);
    })()
    
    
    
    
    
    // Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
    // Example posting a text URL:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("summarization", new {
            text = "YOUR_TEXT_URL",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example posting a local text file:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("summarization", new {
            text = File.OpenRead("C:\\path\\to\\your\\file.txt"),
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example directly sending a text string:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("summarization", new {
            text = "YOUR_TEXT_HERE",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    
    

    Reduces the size of a document by only keeping the most relevant sentences from it. This model aims to reduce the size to 20% of the original.

    HTTP Request

    POST https://api.deepai.org/api/summarization

    Headers

    Parameter Default Description
    Api-Key null Your production API Key.

    Form Fields

    Name Type Description
    text text Enter a few paragraphs of text:

    Text Tagging

    # Example posting a text URL:
    
    curl \
        -F 'text=YOUR_TEXT_URL' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/text-tagging 
    
    
    # Example posting a local text file:
    
    curl \
        -F 'text=@/path/to/your/file.txt' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/text-tagging 
    
    
    # Example directly sending a text string:
    
    curl \
        -F 'text=YOUR_TEXT_HERE' \
        -H 'api-key:YOUR_API_KEY' \
        https://api.deepai.org/api/text-tagging 
    
    
    
    
    # Example posting a text URL:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/text-tagging', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'text' => 'YOUR_TEXT_URL',
        }
    )
    puts r
    
    
    # Example posting a local text file:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/text-tagging', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'text' => File.new('/path/to/your/file.txt'),
        }
    )
    puts r
    
    
    # Example directly sending a text string:
    
    require 'rest_client'
    r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/text-tagging', timeout: 600,
        headers: {'api-key' => 'YOUR_API_KEY'},
        payload: {
            'text' => 'YOUR_TEXT_HERE',
        }
    )
    puts r
    
    
    
    
    # Example posting a text URL:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/text-tagging",
        data={
            'text': 'YOUR_TEXT_URL',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example posting a local text file:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/text-tagging",
        files={
            'text': open('/path/to/your/file.txt', 'rb'),
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    # Example directly sending a text string:
    
    import requests
    r = requests.post(
        "https://api.deepai.org/api/text-tagging",
        data={
            'text': 'YOUR_TEXT_HERE',
        },
        headers={'api-key': 'YOUR_API_KEY'}
    )
    print(r.json())
    
    
    
    
    
    // Get the 'deepai' package here (Compatible with browser & nodejs):
    //     https://www.npmjs.com/package/deepai
    // All examples use JS async-await syntax, be sure to call the API inside an async function.
    //     Learn more about async-await here: https://javascript.info/async-await
    
    // Example posting a text URL:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("text-tagging", {
                text: "YOUR_TEXT_URL",
        });
        console.log(resp);
    })()
    
    
    // Example posting file picker input text (Browser only):
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("text-tagging", {
                text: document.getElementById('yourFileInputId'),
        });
        console.log(resp);
    })()
    
    
    // Example posting a local text file (Node.js only):
    const fs = require('fs');
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("text-tagging", {
                text: fs.createReadStream("/path/to/your/file.txt"),
        });
        console.log(resp);
    })()
    
    
    // Example directly sending a text string:
    
    const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
    
    deepai.setApiKey('YOUR_API_KEY');
    
    (async function() {
        var resp = await deepai.callStandardApi("text-tagging", {
                text: "YOUR_TEXT_HERE",
        });
        console.log(resp);
    })()
    
    
    
    
    
    // Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
    // Example posting a text URL:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("text-tagging", new {
            text = "YOUR_TEXT_URL",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example posting a local text file:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("text-tagging", new {
            text = File.OpenRead("C:\\path\\to\\your\\file.txt"),
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    // Example directly sending a text string:
    
    using DeepAI; // Add this line to the top of your file
    
    DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
    
    StandardApiResponse resp = api.callStandardApi("text-tagging", new {
            text = "YOUR_TEXT_HERE",
    });
    Console.Write(api.objectAsJsonString(resp));
    
    
    
    

    Extracts the most relevant and unique words from a sample of text. These words can then be used to classify documents.

    HTTP Request

    POST https://api.deepai.org/api/text-tagging

    Headers

    Parameter Default Description
    Api-Key null Your production API Key.

    Form Fields

    Name Type Description
    text text Enter a few paragraphs of text: