mapleflow 0.8.1__py3-none-any.whl

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.
Files changed (71) hide show
  1. mapleflow/__init__.py +8 -0
  2. mapleflow/api/__init__.py +1 -0
  3. mapleflow/api/ai/__init__.py +1 -0
  4. mapleflow/api/ai/post_ai_chat.py +195 -0
  5. mapleflow/api/ai/post_ai_embeddings.py +191 -0
  6. mapleflow/api/ai/post_ai_images.py +195 -0
  7. mapleflow/api/ai/post_ai_speech.py +191 -0
  8. mapleflow/api/ai/post_ai_transcribe.py +189 -0
  9. mapleflow/api/images/__init__.py +1 -0
  10. mapleflow/api/images/post_images_bg_remove.py +235 -0
  11. mapleflow/api/utility/__init__.py +1 -0
  12. mapleflow/api/utility/get_currency.py +253 -0
  13. mapleflow/api/utility/get_weather.py +277 -0
  14. mapleflow/api/utility/post_translate.py +206 -0
  15. mapleflow/api/verify/__init__.py +1 -0
  16. mapleflow/api/verify/post_verify_face.py +190 -0
  17. mapleflow/api/verify/post_verify_labels.py +190 -0
  18. mapleflow/client.py +282 -0
  19. mapleflow/errors.py +16 -0
  20. mapleflow/models/__init__.py +99 -0
  21. mapleflow/models/get_currency_response_200.py +81 -0
  22. mapleflow/models/get_currency_response_400.py +81 -0
  23. mapleflow/models/get_currency_response_404.py +81 -0
  24. mapleflow/models/get_currency_response_502.py +81 -0
  25. mapleflow/models/get_weather_response_200.py +81 -0
  26. mapleflow/models/get_weather_response_400.py +81 -0
  27. mapleflow/models/get_weather_response_404.py +81 -0
  28. mapleflow/models/get_weather_response_502.py +81 -0
  29. mapleflow/models/get_weather_units.py +9 -0
  30. mapleflow/models/post_ai_chat_body.py +104 -0
  31. mapleflow/models/post_ai_chat_body_messages_item.py +69 -0
  32. mapleflow/models/post_ai_chat_body_model.py +9 -0
  33. mapleflow/models/post_ai_chat_response_200.py +72 -0
  34. mapleflow/models/post_ai_chat_response_400.py +69 -0
  35. mapleflow/models/post_ai_embeddings_body.py +98 -0
  36. mapleflow/models/post_ai_embeddings_body_model.py +8 -0
  37. mapleflow/models/post_ai_embeddings_response_200.py +72 -0
  38. mapleflow/models/post_ai_embeddings_response_400.py +69 -0
  39. mapleflow/models/post_ai_images_body.py +90 -0
  40. mapleflow/models/post_ai_images_body_model.py +9 -0
  41. mapleflow/models/post_ai_images_response_200.py +72 -0
  42. mapleflow/models/post_ai_images_response_400.py +69 -0
  43. mapleflow/models/post_ai_speech_body.py +80 -0
  44. mapleflow/models/post_ai_speech_body_model.py +8 -0
  45. mapleflow/models/post_ai_speech_response_200.py +72 -0
  46. mapleflow/models/post_ai_speech_response_400.py +69 -0
  47. mapleflow/models/post_ai_transcribe_body.py +81 -0
  48. mapleflow/models/post_ai_transcribe_response_200.py +72 -0
  49. mapleflow/models/post_ai_transcribe_response_400.py +69 -0
  50. mapleflow/models/post_images_bg_remove_files_body.py +93 -0
  51. mapleflow/models/post_images_bg_remove_json_body.py +70 -0
  52. mapleflow/models/post_images_bg_remove_response_200.py +72 -0
  53. mapleflow/models/post_images_bg_remove_response_400.py +69 -0
  54. mapleflow/models/post_images_bg_remove_response_502.py +69 -0
  55. mapleflow/models/post_images_bg_remove_response_504.py +69 -0
  56. mapleflow/models/post_translate_body.py +89 -0
  57. mapleflow/models/post_translate_response_200.py +81 -0
  58. mapleflow/models/post_translate_response_400.py +81 -0
  59. mapleflow/models/post_translate_response_402.py +81 -0
  60. mapleflow/models/post_verify_face_files_body.py +100 -0
  61. mapleflow/models/post_verify_face_json_body.py +69 -0
  62. mapleflow/models/post_verify_face_response_200.py +72 -0
  63. mapleflow/models/post_verify_face_response_400.py +69 -0
  64. mapleflow/models/post_verify_labels_files_body.py +81 -0
  65. mapleflow/models/post_verify_labels_json_body.py +61 -0
  66. mapleflow/models/post_verify_labels_response_200.py +72 -0
  67. mapleflow/models/post_verify_labels_response_400.py +69 -0
  68. mapleflow/types.py +54 -0
  69. mapleflow-0.8.1.dist-info/METADATA +54 -0
  70. mapleflow-0.8.1.dist-info/RECORD +71 -0
  71. mapleflow-0.8.1.dist-info/WHEEL +4 -0
mapleflow/__init__.py ADDED
@@ -0,0 +1,8 @@
1
+ """A client library for accessing MapleFlow"""
2
+
3
+ from .client import AuthenticatedClient, Client
4
+
5
+ __all__ = (
6
+ "AuthenticatedClient",
7
+ "Client",
8
+ )
@@ -0,0 +1 @@
1
+ """Contains methods for accessing the API"""
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""
@@ -0,0 +1,195 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.post_ai_chat_body import PostAiChatBody
9
+ from ...models.post_ai_chat_response_200 import PostAiChatResponse200
10
+ from ...models.post_ai_chat_response_400 import PostAiChatResponse400
11
+ from ...types import UNSET, Response, Unset
12
+
13
+
14
+ def _get_kwargs(
15
+ *,
16
+ body: PostAiChatBody | Unset = UNSET,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "post",
22
+ "url": "/ai/chat",
23
+ }
24
+
25
+ if not isinstance(body, Unset):
26
+ _kwargs["json"] = body.to_dict()
27
+
28
+ headers["Content-Type"] = "application/json"
29
+
30
+ _kwargs["headers"] = headers
31
+ return _kwargs
32
+
33
+
34
+ def _parse_response(
35
+ *, client: AuthenticatedClient | Client, response: httpx.Response
36
+ ) -> PostAiChatResponse200 | PostAiChatResponse400 | None:
37
+ if response.status_code == 200:
38
+ response_200 = PostAiChatResponse200.from_dict(response.json())
39
+
40
+ return response_200
41
+
42
+ if response.status_code == 400:
43
+ response_400 = PostAiChatResponse400.from_dict(response.json())
44
+
45
+ return response_400
46
+
47
+ if client.raise_on_unexpected_status:
48
+ raise errors.UnexpectedStatus(response.status_code, response.content)
49
+ else:
50
+ return None
51
+
52
+
53
+ def _build_response(
54
+ *, client: AuthenticatedClient | Client, response: httpx.Response
55
+ ) -> Response[PostAiChatResponse200 | PostAiChatResponse400]:
56
+ return Response(
57
+ status_code=HTTPStatus(response.status_code),
58
+ content=response.content,
59
+ headers=response.headers,
60
+ parsed=_parse_response(client=client, response=response),
61
+ )
62
+
63
+
64
+ def sync_detailed(
65
+ *,
66
+ client: AuthenticatedClient | Client,
67
+ body: PostAiChatBody | Unset = UNSET,
68
+ ) -> Response[PostAiChatResponse200 | PostAiChatResponse400]:
69
+ """Chat completion
70
+
71
+ Generate chat completions.
72
+
73
+ | Model | Credits |
74
+ |---|---|
75
+ | `llama-3.1-8b` | 2 |
76
+ | `deepseek-r1-32b` | 5 |
77
+
78
+ Args:
79
+ body (PostAiChatBody | Unset):
80
+
81
+ Raises:
82
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
83
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
84
+
85
+ Returns:
86
+ Response[PostAiChatResponse200 | PostAiChatResponse400]
87
+ """
88
+
89
+ kwargs = _get_kwargs(
90
+ body=body,
91
+ )
92
+
93
+ response = client.get_httpx_client().request(
94
+ **kwargs,
95
+ )
96
+
97
+ return _build_response(client=client, response=response)
98
+
99
+
100
+ def sync(
101
+ *,
102
+ client: AuthenticatedClient | Client,
103
+ body: PostAiChatBody | Unset = UNSET,
104
+ ) -> PostAiChatResponse200 | PostAiChatResponse400 | None:
105
+ """Chat completion
106
+
107
+ Generate chat completions.
108
+
109
+ | Model | Credits |
110
+ |---|---|
111
+ | `llama-3.1-8b` | 2 |
112
+ | `deepseek-r1-32b` | 5 |
113
+
114
+ Args:
115
+ body (PostAiChatBody | Unset):
116
+
117
+ Raises:
118
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
119
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
120
+
121
+ Returns:
122
+ PostAiChatResponse200 | PostAiChatResponse400
123
+ """
124
+
125
+ return sync_detailed(
126
+ client=client,
127
+ body=body,
128
+ ).parsed
129
+
130
+
131
+ async def asyncio_detailed(
132
+ *,
133
+ client: AuthenticatedClient | Client,
134
+ body: PostAiChatBody | Unset = UNSET,
135
+ ) -> Response[PostAiChatResponse200 | PostAiChatResponse400]:
136
+ """Chat completion
137
+
138
+ Generate chat completions.
139
+
140
+ | Model | Credits |
141
+ |---|---|
142
+ | `llama-3.1-8b` | 2 |
143
+ | `deepseek-r1-32b` | 5 |
144
+
145
+ Args:
146
+ body (PostAiChatBody | Unset):
147
+
148
+ Raises:
149
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
150
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
151
+
152
+ Returns:
153
+ Response[PostAiChatResponse200 | PostAiChatResponse400]
154
+ """
155
+
156
+ kwargs = _get_kwargs(
157
+ body=body,
158
+ )
159
+
160
+ response = await client.get_async_httpx_client().request(**kwargs)
161
+
162
+ return _build_response(client=client, response=response)
163
+
164
+
165
+ async def asyncio(
166
+ *,
167
+ client: AuthenticatedClient | Client,
168
+ body: PostAiChatBody | Unset = UNSET,
169
+ ) -> PostAiChatResponse200 | PostAiChatResponse400 | None:
170
+ """Chat completion
171
+
172
+ Generate chat completions.
173
+
174
+ | Model | Credits |
175
+ |---|---|
176
+ | `llama-3.1-8b` | 2 |
177
+ | `deepseek-r1-32b` | 5 |
178
+
179
+ Args:
180
+ body (PostAiChatBody | Unset):
181
+
182
+ Raises:
183
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
184
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
185
+
186
+ Returns:
187
+ PostAiChatResponse200 | PostAiChatResponse400
188
+ """
189
+
190
+ return (
191
+ await asyncio_detailed(
192
+ client=client,
193
+ body=body,
194
+ )
195
+ ).parsed
@@ -0,0 +1,191 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.post_ai_embeddings_body import PostAiEmbeddingsBody
9
+ from ...models.post_ai_embeddings_response_200 import PostAiEmbeddingsResponse200
10
+ from ...models.post_ai_embeddings_response_400 import PostAiEmbeddingsResponse400
11
+ from ...types import UNSET, Response, Unset
12
+
13
+
14
+ def _get_kwargs(
15
+ *,
16
+ body: PostAiEmbeddingsBody | Unset = UNSET,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "post",
22
+ "url": "/ai/embeddings",
23
+ }
24
+
25
+ if not isinstance(body, Unset):
26
+ _kwargs["json"] = body.to_dict()
27
+
28
+ headers["Content-Type"] = "application/json"
29
+
30
+ _kwargs["headers"] = headers
31
+ return _kwargs
32
+
33
+
34
+ def _parse_response(
35
+ *, client: AuthenticatedClient | Client, response: httpx.Response
36
+ ) -> PostAiEmbeddingsResponse200 | PostAiEmbeddingsResponse400 | None:
37
+ if response.status_code == 200:
38
+ response_200 = PostAiEmbeddingsResponse200.from_dict(response.json())
39
+
40
+ return response_200
41
+
42
+ if response.status_code == 400:
43
+ response_400 = PostAiEmbeddingsResponse400.from_dict(response.json())
44
+
45
+ return response_400
46
+
47
+ if client.raise_on_unexpected_status:
48
+ raise errors.UnexpectedStatus(response.status_code, response.content)
49
+ else:
50
+ return None
51
+
52
+
53
+ def _build_response(
54
+ *, client: AuthenticatedClient | Client, response: httpx.Response
55
+ ) -> Response[PostAiEmbeddingsResponse200 | PostAiEmbeddingsResponse400]:
56
+ return Response(
57
+ status_code=HTTPStatus(response.status_code),
58
+ content=response.content,
59
+ headers=response.headers,
60
+ parsed=_parse_response(client=client, response=response),
61
+ )
62
+
63
+
64
+ def sync_detailed(
65
+ *,
66
+ client: AuthenticatedClient | Client,
67
+ body: PostAiEmbeddingsBody | Unset = UNSET,
68
+ ) -> Response[PostAiEmbeddingsResponse200 | PostAiEmbeddingsResponse400]:
69
+ """Text embeddings
70
+
71
+ Generate vector embeddings from text.
72
+
73
+ | Model | Credits |
74
+ |---|---|
75
+ | `bge-base-en` | 1 |
76
+
77
+ Args:
78
+ body (PostAiEmbeddingsBody | Unset):
79
+
80
+ Raises:
81
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
82
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
83
+
84
+ Returns:
85
+ Response[PostAiEmbeddingsResponse200 | PostAiEmbeddingsResponse400]
86
+ """
87
+
88
+ kwargs = _get_kwargs(
89
+ body=body,
90
+ )
91
+
92
+ response = client.get_httpx_client().request(
93
+ **kwargs,
94
+ )
95
+
96
+ return _build_response(client=client, response=response)
97
+
98
+
99
+ def sync(
100
+ *,
101
+ client: AuthenticatedClient | Client,
102
+ body: PostAiEmbeddingsBody | Unset = UNSET,
103
+ ) -> PostAiEmbeddingsResponse200 | PostAiEmbeddingsResponse400 | None:
104
+ """Text embeddings
105
+
106
+ Generate vector embeddings from text.
107
+
108
+ | Model | Credits |
109
+ |---|---|
110
+ | `bge-base-en` | 1 |
111
+
112
+ Args:
113
+ body (PostAiEmbeddingsBody | Unset):
114
+
115
+ Raises:
116
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
117
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
118
+
119
+ Returns:
120
+ PostAiEmbeddingsResponse200 | PostAiEmbeddingsResponse400
121
+ """
122
+
123
+ return sync_detailed(
124
+ client=client,
125
+ body=body,
126
+ ).parsed
127
+
128
+
129
+ async def asyncio_detailed(
130
+ *,
131
+ client: AuthenticatedClient | Client,
132
+ body: PostAiEmbeddingsBody | Unset = UNSET,
133
+ ) -> Response[PostAiEmbeddingsResponse200 | PostAiEmbeddingsResponse400]:
134
+ """Text embeddings
135
+
136
+ Generate vector embeddings from text.
137
+
138
+ | Model | Credits |
139
+ |---|---|
140
+ | `bge-base-en` | 1 |
141
+
142
+ Args:
143
+ body (PostAiEmbeddingsBody | Unset):
144
+
145
+ Raises:
146
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
147
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
148
+
149
+ Returns:
150
+ Response[PostAiEmbeddingsResponse200 | PostAiEmbeddingsResponse400]
151
+ """
152
+
153
+ kwargs = _get_kwargs(
154
+ body=body,
155
+ )
156
+
157
+ response = await client.get_async_httpx_client().request(**kwargs)
158
+
159
+ return _build_response(client=client, response=response)
160
+
161
+
162
+ async def asyncio(
163
+ *,
164
+ client: AuthenticatedClient | Client,
165
+ body: PostAiEmbeddingsBody | Unset = UNSET,
166
+ ) -> PostAiEmbeddingsResponse200 | PostAiEmbeddingsResponse400 | None:
167
+ """Text embeddings
168
+
169
+ Generate vector embeddings from text.
170
+
171
+ | Model | Credits |
172
+ |---|---|
173
+ | `bge-base-en` | 1 |
174
+
175
+ Args:
176
+ body (PostAiEmbeddingsBody | Unset):
177
+
178
+ Raises:
179
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
180
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
181
+
182
+ Returns:
183
+ PostAiEmbeddingsResponse200 | PostAiEmbeddingsResponse400
184
+ """
185
+
186
+ return (
187
+ await asyncio_detailed(
188
+ client=client,
189
+ body=body,
190
+ )
191
+ ).parsed
@@ -0,0 +1,195 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.post_ai_images_body import PostAiImagesBody
9
+ from ...models.post_ai_images_response_200 import PostAiImagesResponse200
10
+ from ...models.post_ai_images_response_400 import PostAiImagesResponse400
11
+ from ...types import UNSET, Response, Unset
12
+
13
+
14
+ def _get_kwargs(
15
+ *,
16
+ body: PostAiImagesBody | Unset = UNSET,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "post",
22
+ "url": "/ai/images",
23
+ }
24
+
25
+ if not isinstance(body, Unset):
26
+ _kwargs["json"] = body.to_dict()
27
+
28
+ headers["Content-Type"] = "application/json"
29
+
30
+ _kwargs["headers"] = headers
31
+ return _kwargs
32
+
33
+
34
+ def _parse_response(
35
+ *, client: AuthenticatedClient | Client, response: httpx.Response
36
+ ) -> PostAiImagesResponse200 | PostAiImagesResponse400 | None:
37
+ if response.status_code == 200:
38
+ response_200 = PostAiImagesResponse200.from_dict(response.json())
39
+
40
+ return response_200
41
+
42
+ if response.status_code == 400:
43
+ response_400 = PostAiImagesResponse400.from_dict(response.json())
44
+
45
+ return response_400
46
+
47
+ if client.raise_on_unexpected_status:
48
+ raise errors.UnexpectedStatus(response.status_code, response.content)
49
+ else:
50
+ return None
51
+
52
+
53
+ def _build_response(
54
+ *, client: AuthenticatedClient | Client, response: httpx.Response
55
+ ) -> Response[PostAiImagesResponse200 | PostAiImagesResponse400]:
56
+ return Response(
57
+ status_code=HTTPStatus(response.status_code),
58
+ content=response.content,
59
+ headers=response.headers,
60
+ parsed=_parse_response(client=client, response=response),
61
+ )
62
+
63
+
64
+ def sync_detailed(
65
+ *,
66
+ client: AuthenticatedClient | Client,
67
+ body: PostAiImagesBody | Unset = UNSET,
68
+ ) -> Response[PostAiImagesResponse200 | PostAiImagesResponse400]:
69
+ """Image generation
70
+
71
+ Generate images from text prompts.
72
+
73
+ | Model | Credits |
74
+ |---|---|
75
+ | `flux-schnell` | 5 |
76
+ | `flux-dev` | 5 |
77
+
78
+ Args:
79
+ body (PostAiImagesBody | Unset):
80
+
81
+ Raises:
82
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
83
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
84
+
85
+ Returns:
86
+ Response[PostAiImagesResponse200 | PostAiImagesResponse400]
87
+ """
88
+
89
+ kwargs = _get_kwargs(
90
+ body=body,
91
+ )
92
+
93
+ response = client.get_httpx_client().request(
94
+ **kwargs,
95
+ )
96
+
97
+ return _build_response(client=client, response=response)
98
+
99
+
100
+ def sync(
101
+ *,
102
+ client: AuthenticatedClient | Client,
103
+ body: PostAiImagesBody | Unset = UNSET,
104
+ ) -> PostAiImagesResponse200 | PostAiImagesResponse400 | None:
105
+ """Image generation
106
+
107
+ Generate images from text prompts.
108
+
109
+ | Model | Credits |
110
+ |---|---|
111
+ | `flux-schnell` | 5 |
112
+ | `flux-dev` | 5 |
113
+
114
+ Args:
115
+ body (PostAiImagesBody | Unset):
116
+
117
+ Raises:
118
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
119
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
120
+
121
+ Returns:
122
+ PostAiImagesResponse200 | PostAiImagesResponse400
123
+ """
124
+
125
+ return sync_detailed(
126
+ client=client,
127
+ body=body,
128
+ ).parsed
129
+
130
+
131
+ async def asyncio_detailed(
132
+ *,
133
+ client: AuthenticatedClient | Client,
134
+ body: PostAiImagesBody | Unset = UNSET,
135
+ ) -> Response[PostAiImagesResponse200 | PostAiImagesResponse400]:
136
+ """Image generation
137
+
138
+ Generate images from text prompts.
139
+
140
+ | Model | Credits |
141
+ |---|---|
142
+ | `flux-schnell` | 5 |
143
+ | `flux-dev` | 5 |
144
+
145
+ Args:
146
+ body (PostAiImagesBody | Unset):
147
+
148
+ Raises:
149
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
150
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
151
+
152
+ Returns:
153
+ Response[PostAiImagesResponse200 | PostAiImagesResponse400]
154
+ """
155
+
156
+ kwargs = _get_kwargs(
157
+ body=body,
158
+ )
159
+
160
+ response = await client.get_async_httpx_client().request(**kwargs)
161
+
162
+ return _build_response(client=client, response=response)
163
+
164
+
165
+ async def asyncio(
166
+ *,
167
+ client: AuthenticatedClient | Client,
168
+ body: PostAiImagesBody | Unset = UNSET,
169
+ ) -> PostAiImagesResponse200 | PostAiImagesResponse400 | None:
170
+ """Image generation
171
+
172
+ Generate images from text prompts.
173
+
174
+ | Model | Credits |
175
+ |---|---|
176
+ | `flux-schnell` | 5 |
177
+ | `flux-dev` | 5 |
178
+
179
+ Args:
180
+ body (PostAiImagesBody | Unset):
181
+
182
+ Raises:
183
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
184
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
185
+
186
+ Returns:
187
+ PostAiImagesResponse200 | PostAiImagesResponse400
188
+ """
189
+
190
+ return (
191
+ await asyncio_detailed(
192
+ client=client,
193
+ body=body,
194
+ )
195
+ ).parsed