This project provides a simple .NET MVC Web Application + .NET Core API to generate images from an text using OpenAi library .NET.
- SDK .NET 7.0 or later
- Docker
# Clone the repository
git clone https://github.com/cerqueirav/openai-web-app
# Navigate to the project directory
cd openai-web-app/GptWeb
# Install the dependencies (using NuGet or CMD)
- Newtonsoft Json 13.0.3 or later
- Microsoft Visual Studio Azure Containers Tools Targets 1.17.0 or later
# Run the Web Aplicattion
dotnet run or run through visual studio
# Clone the repository
git clone https://github.com/cerqueirav/openai-web-app
# Navigate to the project directory
cd openai-web-app/GptApi
# Install the dependencies (using NuGet or CMD)
- Microsoft AspNetCore OpenApi 7.0.2 or later
- Microsoft Visual Studio Azure Containers Tools Targets 1.17.0 or later
- OpenAi-DotNet 6.7.1 or later
- Swashbuckle AspNetCore 6.4.0 or later
# Run the Web API
dotnet run or run through visual studio
## Documentation
```bash
POST https://localhost:44391/images/create
The request body must be a JSON object with the following field:
- title (required): The text you want to create image.
- qty (required): The number of images that will be generated
- size (optional): The size of the images that will be generated
Example:
{
"title": "Cat Yellow",
"qty": 2
}
The response will be a list of qty size images related to the searched title