hostinger-api-sdk 1.64.1 → 1.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,69 @@
1
+ # WordPressAIContentApi
2
+
3
+ All URIs are relative to *https://developers.hostinger.com*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**generateImagesV1**](#generateimagesv1) | **POST** /api/hosting/v1/accounts/{username}/wordpress/{software}/content/images/generate | Generate images|
8
+
9
+ # **generateImagesV1**
10
+ > WordPressV1ContentGeneratedImagesResource generateImagesV1(wordPressV1ContentGenerateImagesRequest)
11
+
12
+ Generate one or more images from a prompt and an image type for the specified WordPress installation. Images are returned inline as base64-encoded PNGs. They match the requested aspect ratio and are never smaller than the requested size; logos are transparent PNGs cropped to the mark. Generation is synchronous and can take up to a minute. The endpoint is limited to 10 requests per minute. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
13
+
14
+ ### Example
15
+
16
+ ```typescript
17
+ import {
18
+ WordPressAIContentApi,
19
+ Configuration,
20
+ WordPressV1ContentGenerateImagesRequest
21
+ } from '@hostinger/sdk';
22
+
23
+ const configuration = new Configuration();
24
+ const apiInstance = new WordPressAIContentApi(configuration);
25
+
26
+ let username: string; // (default to undefined)
27
+ let software: string; //WordPress installation (software) identifier (default to undefined)
28
+ let wordPressV1ContentGenerateImagesRequest: WordPressV1ContentGenerateImagesRequest; //
29
+
30
+ const { status, data } = await apiInstance.generateImagesV1(
31
+ username,
32
+ software,
33
+ wordPressV1ContentGenerateImagesRequest
34
+ );
35
+ ```
36
+
37
+ ### Parameters
38
+
39
+ |Name | Type | Description | Notes|
40
+ |------------- | ------------- | ------------- | -------------|
41
+ | **wordPressV1ContentGenerateImagesRequest** | **WordPressV1ContentGenerateImagesRequest**| | |
42
+ | **username** | [**string**] | | defaults to undefined|
43
+ | **software** | [**string**] | WordPress installation (software) identifier | defaults to undefined|
44
+
45
+
46
+ ### Return type
47
+
48
+ **WordPressV1ContentGeneratedImagesResource**
49
+
50
+ ### Authorization
51
+
52
+ [apiToken](../README.md#apiToken)
53
+
54
+ ### HTTP request headers
55
+
56
+ - **Content-Type**: application/json
57
+ - **Accept**: application/json
58
+
59
+
60
+ ### HTTP response details
61
+ | Status code | Description | Response headers |
62
+ |-------------|-------------|------------------|
63
+ |**200** | Success response | - |
64
+ |**422** | Validation error response | - |
65
+ |**401** | Unauthenticated response | - |
66
+ |**500** | Error response | - |
67
+
68
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
69
+
@@ -0,0 +1,33 @@
1
+ # WordPressV1ContentGenerateImagesRequest
2
+
3
+ Generate images from a prompt and an image type
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **prompt** | **string** | What the image should show. For the logo type, the wordmark and mark to render. | [default to undefined]
10
+ **image_type** | **string** | Kind of image to generate. It sets the default size and cropping. | [default to undefined]
11
+ **num_of_images** | **number** | How many images to generate | [optional] [default to 1]
12
+ **width** | **number** | Output width in pixels. Defaults per image type and is ignored for the logo type. | [optional] [default to undefined]
13
+ **height** | **number** | Output height in pixels. Defaults per image type and is ignored for the logo type. | [optional] [default to undefined]
14
+ **style** | **string** | Style tokens appended to photographic prompts. Ignored for the logo type. | [optional] [default to undefined]
15
+ **color_guidance** | **string** | Colour direction for the logo type only. It is not rendered as text. | [optional] [default to undefined]
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import { WordPressV1ContentGenerateImagesRequest } from '@hostinger/sdk';
21
+
22
+ const instance: WordPressV1ContentGenerateImagesRequest = {
23
+ prompt,
24
+ image_type,
25
+ num_of_images,
26
+ width,
27
+ height,
28
+ style,
29
+ color_guidance,
30
+ };
31
+ ```
32
+
33
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,23 @@
1
+ # WordPressV1ContentGeneratedImagesResource
2
+
3
+ Images generated by the AI image generator.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **images** | **Array<string>** | Generated images, each encoded as a base64 string | [default to undefined]
10
+ **content_type** | **string** | MIME type shared by all returned images | [default to undefined]
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { WordPressV1ContentGeneratedImagesResource } from '@hostinger/sdk';
16
+
17
+ const instance: WordPressV1ContentGeneratedImagesResource = {
18
+ images,
19
+ content_type,
20
+ };
21
+ ```
22
+
23
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
package/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.64.1
6
+ * API Version: 1.66.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-sdk",
3
- "version": "1.64.1",
3
+ "version": "1.66.0",
4
4
  "description": "Hostinger API TypeScript SDK",
5
5
  "author": "Hostinger",
6
6
  "repository": {