Yasminaai C# Library
Table of Contents
Requirements
This SDK requires:Installation
Reference
A full reference for this library is available here.Usage
Instantiate and use the client with the following:Environments
This SDK allows you to configure different environments for API requests.Exception Handling
When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error will be thrown.Advanced
Retries
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long as the request is deemed retryable and the number of retry attempts has not grown larger than the configured retry limit (default: 2). Which status codes are retried depends on theretryStatusCodes generator configuration:
legacy (current default): retries on
recommended: retries on
- 408 (Timeout)
- 429 (Too Many Requests)
- 502 (Bad Gateway)
- 503 (Service Unavailable)
- 504 (Gateway Timeout)
MaxRetries request option to configure this behavior.
Timeouts
The SDK defaults to a 30 second timeout. Use theTimeout option to configure this behavior.
Raw Response
Access raw HTTP response data (status code, headers, URL) alongside parsed response data using the.WithRawResponse() method.
Additional Headers
If you would like to send additional headers as part of the request, use theAdditionalHeaders request option.
Additional Query Parameters
If you would like to send additional query parameters as part of the request, use theAdditionalQueryParameters request option.

