# OpenAIClient (Chat GPT)

In this super simple example, we'll create and submit a request to `gpt-5.1`, in only a few lines of code.&#x20;

{% hint style="success" %}
The [OpenAIClient](https://docs.perigee.software/core-modules/utility-classes/openai-client-responses) is designed to be easy to use, read, and implement in your own codebase.
{% endhint %}

{% code overflow="wrap" %}

```csharp
//Declare a client
var aic = new OpenAIClient(apiKey);

//Get a response
var response = await aic.GetResponseAsync(
   OpenAIClient.GPT51("It's this easy to message AI??")
   .WithInstructions("You're a helpful assistant, respond kindly and to the point"));

//Use the built in MessageContent Property to retrieve the latest message
if (response.IsSuccessful)
    Console.WriteLine(response.Data.MessageContent);
```

{% endcode %}
