@musallam/ffs-firefly-client 1.0.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.
- package/dist/distribution-BwPC3bzJ.cjs +3 -0
- package/dist/distribution-WitwksSh.mjs +4 -0
- package/dist/distribution-WitwksSh.mjs.map +1 -0
- package/dist/flat.cjs +7 -0
- package/dist/flat.d.cts +2362 -0
- package/dist/flat.d.cts.map +1 -0
- package/dist/flat.d.mts +2362 -0
- package/dist/flat.d.mts.map +1 -0
- package/dist/flat.mjs +8 -0
- package/dist/flat.mjs.map +1 -0
- package/dist/index-B2PznWi7.d.cts +979 -0
- package/dist/index-B2PznWi7.d.cts.map +1 -0
- package/dist/index-IOhsyoSY.d.mts +979 -0
- package/dist/index-IOhsyoSY.d.mts.map +1 -0
- package/dist/sdk.cjs +7 -0
- package/dist/sdk.d.cts +2381 -0
- package/dist/sdk.d.cts.map +1 -0
- package/dist/sdk.d.mts +2381 -0
- package/dist/sdk.d.mts.map +1 -0
- package/dist/sdk.mjs +8 -0
- package/dist/sdk.mjs.map +1 -0
- package/package.json +35 -0
package/dist/sdk.d.cts
ADDED
|
@@ -0,0 +1,2381 @@
|
|
|
1
|
+
import { n as Options$2, t as ky } from "./index-B2PznWi7.cjs";
|
|
2
|
+
|
|
3
|
+
//#region packages/firefly/src/sdk/core/auth.gen.d.ts
|
|
4
|
+
type AuthToken = string | undefined;
|
|
5
|
+
interface Auth {
|
|
6
|
+
/**
|
|
7
|
+
* Which part of the request do we use to send the auth?
|
|
8
|
+
*
|
|
9
|
+
* @default 'header'
|
|
10
|
+
*/
|
|
11
|
+
in?: 'header' | 'query' | 'cookie';
|
|
12
|
+
/**
|
|
13
|
+
* Header or query parameter name.
|
|
14
|
+
*
|
|
15
|
+
* @default 'Authorization'
|
|
16
|
+
*/
|
|
17
|
+
name?: string;
|
|
18
|
+
scheme?: 'basic' | 'bearer';
|
|
19
|
+
type: 'apiKey' | 'http';
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region packages/firefly/src/sdk/core/pathSerializer.gen.d.ts
|
|
23
|
+
interface SerializerOptions<T> {
|
|
24
|
+
/**
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
explode: boolean;
|
|
28
|
+
style: T;
|
|
29
|
+
}
|
|
30
|
+
type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
|
|
31
|
+
type ObjectStyle = 'form' | 'deepObject';
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region packages/firefly/src/sdk/core/bodySerializer.gen.d.ts
|
|
34
|
+
type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
35
|
+
type BodySerializer = (body: unknown) => unknown;
|
|
36
|
+
type QuerySerializerOptionsObject = {
|
|
37
|
+
allowReserved?: boolean;
|
|
38
|
+
array?: Partial<SerializerOptions<ArrayStyle>>;
|
|
39
|
+
object?: Partial<SerializerOptions<ObjectStyle>>;
|
|
40
|
+
};
|
|
41
|
+
type QuerySerializerOptions = QuerySerializerOptionsObject & {
|
|
42
|
+
/**
|
|
43
|
+
* Per-parameter serialization overrides. When provided, these settings
|
|
44
|
+
* override the global array/object settings for specific parameter names.
|
|
45
|
+
*/
|
|
46
|
+
parameters?: Record<string, QuerySerializerOptionsObject>;
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region packages/firefly/src/sdk/core/types.gen.d.ts
|
|
50
|
+
type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
|
|
51
|
+
type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
|
|
52
|
+
/**
|
|
53
|
+
* Returns the final request URL.
|
|
54
|
+
*/
|
|
55
|
+
buildUrl: BuildUrlFn;
|
|
56
|
+
getConfig: () => Config;
|
|
57
|
+
request: RequestFn;
|
|
58
|
+
setConfig: (config: Config) => Config;
|
|
59
|
+
} & { [K in HttpMethod]: MethodFn } & ([SseFn] extends [never] ? {
|
|
60
|
+
sse?: never;
|
|
61
|
+
} : {
|
|
62
|
+
sse: { [K in HttpMethod]: SseFn };
|
|
63
|
+
});
|
|
64
|
+
interface Config$1 {
|
|
65
|
+
/**
|
|
66
|
+
* Auth token or a function returning auth token. The resolved value will be
|
|
67
|
+
* added to the request payload as defined by its `security` array.
|
|
68
|
+
*/
|
|
69
|
+
auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
|
|
70
|
+
/**
|
|
71
|
+
* A function for serializing request body parameter. By default,
|
|
72
|
+
* {@link JSON.stringify()} will be used.
|
|
73
|
+
*/
|
|
74
|
+
bodySerializer?: BodySerializer | null;
|
|
75
|
+
/**
|
|
76
|
+
* An object containing any HTTP headers that you want to pre-populate your
|
|
77
|
+
* `Headers` object with.
|
|
78
|
+
*
|
|
79
|
+
* {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
|
|
80
|
+
*/
|
|
81
|
+
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
|
|
82
|
+
/**
|
|
83
|
+
* The request method.
|
|
84
|
+
*
|
|
85
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
|
|
86
|
+
*/
|
|
87
|
+
method?: Uppercase<HttpMethod>;
|
|
88
|
+
/**
|
|
89
|
+
* A function for serializing request query parameters. By default, arrays
|
|
90
|
+
* will be exploded in form style, objects will be exploded in deepObject
|
|
91
|
+
* style, and reserved characters are percent-encoded.
|
|
92
|
+
*
|
|
93
|
+
* This method will have no effect if the native `paramsSerializer()` Axios
|
|
94
|
+
* API function is used.
|
|
95
|
+
*
|
|
96
|
+
* {@link https://swagger.io/docs/specification/serialization/#query View examples}
|
|
97
|
+
*/
|
|
98
|
+
querySerializer?: QuerySerializer | QuerySerializerOptions;
|
|
99
|
+
/**
|
|
100
|
+
* A function validating request data. This is useful if you want to ensure
|
|
101
|
+
* the request conforms to the desired shape, so it can be safely sent to
|
|
102
|
+
* the server.
|
|
103
|
+
*/
|
|
104
|
+
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
105
|
+
/**
|
|
106
|
+
* A function transforming response data before it's returned. This is useful
|
|
107
|
+
* for post-processing data, e.g. converting ISO strings into Date objects.
|
|
108
|
+
*/
|
|
109
|
+
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
110
|
+
/**
|
|
111
|
+
* A function validating response data. This is useful if you want to ensure
|
|
112
|
+
* the response conforms to the desired shape, so it can be safely passed to
|
|
113
|
+
* the transformers and returned to the user.
|
|
114
|
+
*/
|
|
115
|
+
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region packages/firefly/src/sdk/core/serverSentEvents.gen.d.ts
|
|
119
|
+
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
120
|
+
/**
|
|
121
|
+
* Fetch API implementation. You can use this option to provide a custom
|
|
122
|
+
* fetch instance.
|
|
123
|
+
*
|
|
124
|
+
* @default globalThis.fetch
|
|
125
|
+
*/
|
|
126
|
+
fetch?: typeof fetch;
|
|
127
|
+
/**
|
|
128
|
+
* Implementing clients can call request interceptors inside this hook.
|
|
129
|
+
*/
|
|
130
|
+
onRequest?: (url: string, init: RequestInit) => Promise<Request>;
|
|
131
|
+
/**
|
|
132
|
+
* Callback invoked when a network or parsing error occurs during streaming.
|
|
133
|
+
*
|
|
134
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
135
|
+
*
|
|
136
|
+
* @param error The error that occurred.
|
|
137
|
+
*/
|
|
138
|
+
onSseError?: (error: unknown) => void;
|
|
139
|
+
/**
|
|
140
|
+
* Callback invoked when an event is streamed from the server.
|
|
141
|
+
*
|
|
142
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
143
|
+
*
|
|
144
|
+
* @param event Event streamed from the server.
|
|
145
|
+
* @returns Nothing (void).
|
|
146
|
+
*/
|
|
147
|
+
onSseEvent?: (event: StreamEvent<TData>) => void;
|
|
148
|
+
serializedBody?: RequestInit['body'];
|
|
149
|
+
/**
|
|
150
|
+
* Default retry delay in milliseconds.
|
|
151
|
+
*
|
|
152
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
153
|
+
*
|
|
154
|
+
* @default 3000
|
|
155
|
+
*/
|
|
156
|
+
sseDefaultRetryDelay?: number;
|
|
157
|
+
/**
|
|
158
|
+
* Maximum number of retry attempts before giving up.
|
|
159
|
+
*/
|
|
160
|
+
sseMaxRetryAttempts?: number;
|
|
161
|
+
/**
|
|
162
|
+
* Maximum retry delay in milliseconds.
|
|
163
|
+
*
|
|
164
|
+
* Applies only when exponential backoff is used.
|
|
165
|
+
*
|
|
166
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
167
|
+
*
|
|
168
|
+
* @default 30000
|
|
169
|
+
*/
|
|
170
|
+
sseMaxRetryDelay?: number;
|
|
171
|
+
/**
|
|
172
|
+
* Optional sleep function for retry backoff.
|
|
173
|
+
*
|
|
174
|
+
* Defaults to using `setTimeout`.
|
|
175
|
+
*/
|
|
176
|
+
sseSleepFn?: (ms: number) => Promise<void>;
|
|
177
|
+
url: string;
|
|
178
|
+
};
|
|
179
|
+
interface StreamEvent<TData = unknown> {
|
|
180
|
+
data: TData;
|
|
181
|
+
event?: string;
|
|
182
|
+
id?: string;
|
|
183
|
+
retry?: number;
|
|
184
|
+
}
|
|
185
|
+
type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
|
|
186
|
+
stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
|
|
187
|
+
};
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region packages/firefly/src/sdk/client/utils.gen.d.ts
|
|
190
|
+
type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res, request: Req, options: Options) => Err | Promise<Err>;
|
|
191
|
+
type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
192
|
+
type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
193
|
+
declare class Interceptors<Interceptor> {
|
|
194
|
+
fns: Array<Interceptor | null>;
|
|
195
|
+
clear(): void;
|
|
196
|
+
eject(id: number | Interceptor): void;
|
|
197
|
+
exists(id: number | Interceptor): boolean;
|
|
198
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
199
|
+
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
200
|
+
use(fn: Interceptor): number;
|
|
201
|
+
}
|
|
202
|
+
interface Middleware<Req, Res, Err, Options> {
|
|
203
|
+
error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
|
|
204
|
+
request: Interceptors<ReqInterceptor<Req, Options>>;
|
|
205
|
+
response: Interceptors<ResInterceptor<Res, Req, Options>>;
|
|
206
|
+
}
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region packages/firefly/src/sdk/client/types.gen.d.ts
|
|
209
|
+
type ResponseStyle = 'data' | 'fields';
|
|
210
|
+
interface RetryOptions {
|
|
211
|
+
/**
|
|
212
|
+
* Maximum number of retry attempts
|
|
213
|
+
*
|
|
214
|
+
* @default 2
|
|
215
|
+
*/
|
|
216
|
+
limit?: number;
|
|
217
|
+
/**
|
|
218
|
+
* HTTP methods to retry
|
|
219
|
+
*
|
|
220
|
+
* @default ['get', 'put', 'head', 'delete', 'options', 'trace']
|
|
221
|
+
*/
|
|
222
|
+
methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;
|
|
223
|
+
/**
|
|
224
|
+
* HTTP status codes to retry
|
|
225
|
+
*
|
|
226
|
+
* @default [408, 413, 429, 500, 502, 503, 504]
|
|
227
|
+
*/
|
|
228
|
+
statusCodes?: number[];
|
|
229
|
+
}
|
|
230
|
+
interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Options$2, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>, Config$1 {
|
|
231
|
+
/**
|
|
232
|
+
* Base URL for all requests made by this client.
|
|
233
|
+
*/
|
|
234
|
+
baseUrl?: T['baseUrl'];
|
|
235
|
+
/**
|
|
236
|
+
* Ky instance to use. You can use this option to provide a custom
|
|
237
|
+
* ky instance.
|
|
238
|
+
*/
|
|
239
|
+
ky?: typeof ky;
|
|
240
|
+
/**
|
|
241
|
+
* Additional ky-specific options that will be passed directly to ky.
|
|
242
|
+
* This allows you to use any ky option not explicitly exposed in the config.
|
|
243
|
+
*/
|
|
244
|
+
kyOptions?: Omit<Options$2, 'method' | 'prefixUrl'>;
|
|
245
|
+
/**
|
|
246
|
+
* Return the response data parsed in a specified format. By default, `auto`
|
|
247
|
+
* will infer the appropriate method from the `Content-Type` response header.
|
|
248
|
+
* You can override this behavior with any of the {@link Body} methods.
|
|
249
|
+
* Select `stream` if you don't want to parse response data at all.
|
|
250
|
+
*
|
|
251
|
+
* @default 'auto'
|
|
252
|
+
*/
|
|
253
|
+
parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
|
|
254
|
+
/**
|
|
255
|
+
* Should we return only data or multiple fields (data, error, response, etc.)?
|
|
256
|
+
*
|
|
257
|
+
* @default 'fields'
|
|
258
|
+
*/
|
|
259
|
+
responseStyle?: ResponseStyle;
|
|
260
|
+
/**
|
|
261
|
+
* Retry configuration
|
|
262
|
+
*/
|
|
263
|
+
retry?: RetryOptions;
|
|
264
|
+
/**
|
|
265
|
+
* Throw an error instead of returning it in the response?
|
|
266
|
+
*
|
|
267
|
+
* @default false
|
|
268
|
+
*/
|
|
269
|
+
throwOnError?: T['throwOnError'];
|
|
270
|
+
/**
|
|
271
|
+
* Request timeout in milliseconds
|
|
272
|
+
*
|
|
273
|
+
* @default 10000
|
|
274
|
+
*/
|
|
275
|
+
timeout?: number;
|
|
276
|
+
}
|
|
277
|
+
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
278
|
+
responseStyle: TResponseStyle;
|
|
279
|
+
throwOnError: ThrowOnError;
|
|
280
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
281
|
+
/**
|
|
282
|
+
* Any body that you want to add to your request.
|
|
283
|
+
*
|
|
284
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
|
|
285
|
+
*/
|
|
286
|
+
body?: unknown;
|
|
287
|
+
path?: Record<string, unknown>;
|
|
288
|
+
query?: Record<string, unknown>;
|
|
289
|
+
/**
|
|
290
|
+
* Security mechanism(s) to use for the request.
|
|
291
|
+
*/
|
|
292
|
+
security?: ReadonlyArray<Auth>;
|
|
293
|
+
url: Url;
|
|
294
|
+
}
|
|
295
|
+
interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
296
|
+
serializedBody?: string;
|
|
297
|
+
}
|
|
298
|
+
type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
299
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
300
|
+
request: Request;
|
|
301
|
+
response: Response;
|
|
302
|
+
}> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
|
|
303
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
304
|
+
error: undefined;
|
|
305
|
+
} | {
|
|
306
|
+
data: undefined;
|
|
307
|
+
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
308
|
+
}) & {
|
|
309
|
+
request: Request;
|
|
310
|
+
response: Response;
|
|
311
|
+
}>;
|
|
312
|
+
interface ClientOptions$1 {
|
|
313
|
+
baseUrl?: string;
|
|
314
|
+
responseStyle?: ResponseStyle;
|
|
315
|
+
throwOnError?: boolean;
|
|
316
|
+
}
|
|
317
|
+
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
318
|
+
type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
|
|
319
|
+
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
320
|
+
type BuildUrlFn = <TData extends {
|
|
321
|
+
body?: unknown;
|
|
322
|
+
path?: Record<string, unknown>;
|
|
323
|
+
query?: Record<string, unknown>;
|
|
324
|
+
url: string;
|
|
325
|
+
}>(options: TData & Options$1<TData>) => string;
|
|
326
|
+
type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
|
|
327
|
+
interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
|
|
328
|
+
};
|
|
329
|
+
interface TDataShape {
|
|
330
|
+
body?: unknown;
|
|
331
|
+
headers?: unknown;
|
|
332
|
+
path?: unknown;
|
|
333
|
+
query?: unknown;
|
|
334
|
+
url: string;
|
|
335
|
+
}
|
|
336
|
+
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
337
|
+
type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
338
|
+
//#endregion
|
|
339
|
+
//#region packages/firefly/src/sdk/types.gen.d.ts
|
|
340
|
+
type ClientOptions = {
|
|
341
|
+
baseUrl: 'https://firefly-api.adobe.io' | (string & {});
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* AlignmentHorizontal
|
|
345
|
+
*
|
|
346
|
+
* An enumeration.
|
|
347
|
+
*/
|
|
348
|
+
type AlignmentHorizontal = 'center' | 'left' | 'right';
|
|
349
|
+
/**
|
|
350
|
+
* AlignmentVertical
|
|
351
|
+
*
|
|
352
|
+
* An enumeration.
|
|
353
|
+
*/
|
|
354
|
+
type AlignmentVertical = 'center' | 'top' | 'bottom';
|
|
355
|
+
/**
|
|
356
|
+
* ApiError
|
|
357
|
+
*
|
|
358
|
+
* The error within the error response.
|
|
359
|
+
*/
|
|
360
|
+
type ApiError = {
|
|
361
|
+
error_code: ColligoErrorCodeAsyncV3;
|
|
362
|
+
/**
|
|
363
|
+
* Message
|
|
364
|
+
*/
|
|
365
|
+
message?: string;
|
|
366
|
+
/**
|
|
367
|
+
* Stack Trace
|
|
368
|
+
*/
|
|
369
|
+
stack_trace?: Array<string>;
|
|
370
|
+
/**
|
|
371
|
+
* Validation Errors
|
|
372
|
+
*/
|
|
373
|
+
validation_errors?: Array<ValidationErrorMessage>;
|
|
374
|
+
};
|
|
375
|
+
/**
|
|
376
|
+
* ApiErrorGeneric
|
|
377
|
+
*
|
|
378
|
+
* The error within the error response for non-400 failure responses.
|
|
379
|
+
*/
|
|
380
|
+
type ApiErrorGeneric = {
|
|
381
|
+
/**
|
|
382
|
+
* The error code.
|
|
383
|
+
*/
|
|
384
|
+
error_code?: string;
|
|
385
|
+
/**
|
|
386
|
+
* Message
|
|
387
|
+
*
|
|
388
|
+
* A human-readable error message.
|
|
389
|
+
*/
|
|
390
|
+
message?: string;
|
|
391
|
+
};
|
|
392
|
+
type AdaptiveCompositeRequest = {
|
|
393
|
+
/**
|
|
394
|
+
* Background image and fill area mask.
|
|
395
|
+
*/
|
|
396
|
+
background: BackgroundInput;
|
|
397
|
+
/**
|
|
398
|
+
* Object image and optional mask.
|
|
399
|
+
*/
|
|
400
|
+
object: AdaptiveObjectInput;
|
|
401
|
+
/**
|
|
402
|
+
* Number of output variations to generate.
|
|
403
|
+
*/
|
|
404
|
+
numVariations?: number;
|
|
405
|
+
/**
|
|
406
|
+
* Array of seed image IDs. These reference images help ensure consistent image generation across multiple API calls. If specified alongside numVariations, the number of seeds must equal numVariations. Defaults: 1 variation → [333], 2 → [333, 222], 3 → [333, 222, 111].
|
|
407
|
+
*/
|
|
408
|
+
seeds?: Array<number>;
|
|
409
|
+
/**
|
|
410
|
+
* Controls how much the object's colors and lighting are adjusted to match the background scene.
|
|
411
|
+
*/
|
|
412
|
+
harmonization?: number;
|
|
413
|
+
/**
|
|
414
|
+
* Controls shadow intensity in the composited result. Lower values reduce shadow.
|
|
415
|
+
*/
|
|
416
|
+
shadowIntensity?: number;
|
|
417
|
+
/**
|
|
418
|
+
* When true, preserves original background details within the masked area during compositing.
|
|
419
|
+
*/
|
|
420
|
+
preserveBackground?: boolean;
|
|
421
|
+
/**
|
|
422
|
+
* Output format specification.
|
|
423
|
+
*/
|
|
424
|
+
output?: OutputSpec;
|
|
425
|
+
};
|
|
426
|
+
type AdaptiveObjectInput = {
|
|
427
|
+
/**
|
|
428
|
+
* Object image to be composited onto the background.
|
|
429
|
+
*/
|
|
430
|
+
image: ImageRef;
|
|
431
|
+
/**
|
|
432
|
+
* Optional object mask.
|
|
433
|
+
*/
|
|
434
|
+
mask?: ImageRef;
|
|
435
|
+
};
|
|
436
|
+
type AsyncJobResponse = {
|
|
437
|
+
/**
|
|
438
|
+
* Current status of the job.
|
|
439
|
+
*/
|
|
440
|
+
status?: string;
|
|
441
|
+
/**
|
|
442
|
+
* Job URN identifier.
|
|
443
|
+
*/
|
|
444
|
+
jobId?: string;
|
|
445
|
+
/**
|
|
446
|
+
* URL to poll for job status.
|
|
447
|
+
*/
|
|
448
|
+
statusUrl?: string;
|
|
449
|
+
/**
|
|
450
|
+
* URL to cancel the job.
|
|
451
|
+
*/
|
|
452
|
+
cancelUrl?: string;
|
|
453
|
+
};
|
|
454
|
+
type BackgroundInput = {
|
|
455
|
+
/**
|
|
456
|
+
* Background image on which the object will be placed.
|
|
457
|
+
*/
|
|
458
|
+
image: ImageRef;
|
|
459
|
+
/**
|
|
460
|
+
* Mask defining where the object should be placed on the background.
|
|
461
|
+
*/
|
|
462
|
+
fillAreaMask: ImageRef;
|
|
463
|
+
};
|
|
464
|
+
type ImageRef = {
|
|
465
|
+
source: ImageSource;
|
|
466
|
+
};
|
|
467
|
+
/**
|
|
468
|
+
* The image source. Exactly one of `url` or `uploadId` must be provided in the request.
|
|
469
|
+
*/
|
|
470
|
+
type ImageSource = {
|
|
471
|
+
/**
|
|
472
|
+
* If this object represents a file in our S3 temp storage system, the ID for that file.
|
|
473
|
+
*/
|
|
474
|
+
uploadId?: string;
|
|
475
|
+
/**
|
|
476
|
+
* Pre-signed URL of the image from a supported domain. [See Allowed storage domains](https://github.com/your-repo/your-project/blob/main/src/pages/getting-started/usage-notes/index.md#allowed-storage-domains) for the current list.
|
|
477
|
+
*/
|
|
478
|
+
url?: string;
|
|
479
|
+
};
|
|
480
|
+
type ObjectInput = {
|
|
481
|
+
/**
|
|
482
|
+
* Object image to be composited onto the background.
|
|
483
|
+
*/
|
|
484
|
+
image: ImageRef;
|
|
485
|
+
};
|
|
486
|
+
type OutputSpec = {
|
|
487
|
+
/**
|
|
488
|
+
* MIME type for the output image.
|
|
489
|
+
*/
|
|
490
|
+
mediaType?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/jxl';
|
|
491
|
+
};
|
|
492
|
+
type PreciseCompositeRequest = {
|
|
493
|
+
/**
|
|
494
|
+
* Background image and fill area mask specifying object placement.
|
|
495
|
+
*/
|
|
496
|
+
background: BackgroundInput;
|
|
497
|
+
/**
|
|
498
|
+
* Object image to be placed on the background.
|
|
499
|
+
*/
|
|
500
|
+
object: ObjectInput;
|
|
501
|
+
/**
|
|
502
|
+
* Number of output variations to generate.
|
|
503
|
+
*/
|
|
504
|
+
numVariations?: number;
|
|
505
|
+
/**
|
|
506
|
+
* Random seeds for each variation. Count must match numVariations if both are provided. Defaults: 1 variation → [333], 2 → [333, 222], 3 → [333, 222, 111].
|
|
507
|
+
*/
|
|
508
|
+
seeds?: Array<number>;
|
|
509
|
+
/**
|
|
510
|
+
* Controls blend between harmonized and original object appearance (0.0 = fully harmonized, 1.0 = original preserved).
|
|
511
|
+
*/
|
|
512
|
+
blend?: number;
|
|
513
|
+
/**
|
|
514
|
+
* Output format specification.
|
|
515
|
+
*/
|
|
516
|
+
output?: OutputSpec;
|
|
517
|
+
};
|
|
518
|
+
type ValidationErrorDetail = {
|
|
519
|
+
/**
|
|
520
|
+
* Path to the field that caused the error.
|
|
521
|
+
*/
|
|
522
|
+
loc?: Array<string | number>;
|
|
523
|
+
/**
|
|
524
|
+
* Human-readable error message.
|
|
525
|
+
*/
|
|
526
|
+
msg?: string;
|
|
527
|
+
/**
|
|
528
|
+
* Error type identifier.
|
|
529
|
+
*/
|
|
530
|
+
type?: string;
|
|
531
|
+
/**
|
|
532
|
+
* Additional context about the error.
|
|
533
|
+
*/
|
|
534
|
+
ctx?: {
|
|
535
|
+
[key: string]: unknown;
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
type ValidationErrorResponse = {
|
|
539
|
+
error_code?: string;
|
|
540
|
+
/**
|
|
541
|
+
* Human-readable error description.
|
|
542
|
+
*/
|
|
543
|
+
message?: string;
|
|
544
|
+
/**
|
|
545
|
+
* List of field-level validation errors.
|
|
546
|
+
*/
|
|
547
|
+
validation_errors?: Array<ValidationErrorDetail>;
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* JobOutput
|
|
551
|
+
*
|
|
552
|
+
* A single output entry from the job.
|
|
553
|
+
*/
|
|
554
|
+
type JobOutput = {
|
|
555
|
+
/**
|
|
556
|
+
* Random seed used for generation.
|
|
557
|
+
*/
|
|
558
|
+
seed: number;
|
|
559
|
+
/**
|
|
560
|
+
* The generated output image.
|
|
561
|
+
*/
|
|
562
|
+
image: PublicBinaryOutput;
|
|
563
|
+
};
|
|
564
|
+
/**
|
|
565
|
+
* JobPollPayload
|
|
566
|
+
*
|
|
567
|
+
* Returned when the job is pending, running, failed, cancelled, cancel_pending, or timeout.
|
|
568
|
+
*/
|
|
569
|
+
type JobPollPayload = {
|
|
570
|
+
/**
|
|
571
|
+
* Current non-succeeded job status.
|
|
572
|
+
*/
|
|
573
|
+
status: 'pending' | 'running' | 'failed' | 'cancelled' | 'cancel_pending' | 'timeout';
|
|
574
|
+
/**
|
|
575
|
+
* The job ID.
|
|
576
|
+
*/
|
|
577
|
+
jobId: string;
|
|
578
|
+
/**
|
|
579
|
+
* Error code present when status is failed, cancelled, cancel_pending, or timeout.
|
|
580
|
+
*/
|
|
581
|
+
error_code?: string;
|
|
582
|
+
/**
|
|
583
|
+
* Human-readable string describing the error or status.
|
|
584
|
+
*/
|
|
585
|
+
message?: string;
|
|
586
|
+
};
|
|
587
|
+
/**
|
|
588
|
+
* JobResult
|
|
589
|
+
*
|
|
590
|
+
* Contains output data returned by a successfully completed job.
|
|
591
|
+
*/
|
|
592
|
+
type JobResult = {
|
|
593
|
+
/**
|
|
594
|
+
* List of generated outputs.
|
|
595
|
+
*/
|
|
596
|
+
outputs: Array<JobOutput>;
|
|
597
|
+
};
|
|
598
|
+
/**
|
|
599
|
+
* JobResponse
|
|
600
|
+
*
|
|
601
|
+
* Represents the job response, which may be either in progress or completed.
|
|
602
|
+
*/
|
|
603
|
+
type JobResponse = ({
|
|
604
|
+
status: 'succeeded';
|
|
605
|
+
} & JobSucceededPayload) | ({
|
|
606
|
+
status: 'running' | 'failed' | 'cancelled' | 'cancel_pending' | 'timeout';
|
|
607
|
+
} & JobPollPayload);
|
|
608
|
+
/**
|
|
609
|
+
* JobSucceededPayload
|
|
610
|
+
*
|
|
611
|
+
* Returned when the job has completed successfully.
|
|
612
|
+
*/
|
|
613
|
+
type JobSucceededPayload = {
|
|
614
|
+
/**
|
|
615
|
+
* Indicates that the job has succeeded.
|
|
616
|
+
*/
|
|
617
|
+
status: 'succeeded';
|
|
618
|
+
/**
|
|
619
|
+
* The job ID.
|
|
620
|
+
*/
|
|
621
|
+
jobId: string;
|
|
622
|
+
result: JobResult;
|
|
623
|
+
};
|
|
624
|
+
/**
|
|
625
|
+
* PublicBinary-Output
|
|
626
|
+
*
|
|
627
|
+
* Represents binary output (e.g., image, mesh, etc.) with pre-signed URL or storage ID.
|
|
628
|
+
*/
|
|
629
|
+
type PublicBinaryOutput = {
|
|
630
|
+
/**
|
|
631
|
+
* Temporary pre-signed URL to access the output file.
|
|
632
|
+
*/
|
|
633
|
+
url: string;
|
|
634
|
+
};
|
|
635
|
+
/**
|
|
636
|
+
* AsyncAcceptResponseV3
|
|
637
|
+
*/
|
|
638
|
+
type AsyncAcceptResponseV3 = {
|
|
639
|
+
/**
|
|
640
|
+
* Cancel URL
|
|
641
|
+
*
|
|
642
|
+
* The URL to cancel the job.
|
|
643
|
+
*/
|
|
644
|
+
cancelUrl: string;
|
|
645
|
+
/**
|
|
646
|
+
* Job ID
|
|
647
|
+
*
|
|
648
|
+
* The ID of the job.
|
|
649
|
+
*/
|
|
650
|
+
jobId: string;
|
|
651
|
+
/**
|
|
652
|
+
* Status URL
|
|
653
|
+
*
|
|
654
|
+
* The URL to check the status of the job.
|
|
655
|
+
*/
|
|
656
|
+
statusUrl: string;
|
|
657
|
+
};
|
|
658
|
+
/**
|
|
659
|
+
* AsyncApiErrorV3
|
|
660
|
+
*
|
|
661
|
+
* The error within the error response.
|
|
662
|
+
*/
|
|
663
|
+
type AsyncApiErrorV3 = {
|
|
664
|
+
/**
|
|
665
|
+
* Error Code
|
|
666
|
+
*/
|
|
667
|
+
error_code?: string | ColligoErrorCodeAsyncV3 | ColliogAsyncStatusErrorCodeV3 | ColligoAsyncCancelErrorCodeV3;
|
|
668
|
+
/**
|
|
669
|
+
* Job ID
|
|
670
|
+
*/
|
|
671
|
+
jobId?: string;
|
|
672
|
+
/**
|
|
673
|
+
* Message
|
|
674
|
+
*/
|
|
675
|
+
message?: string;
|
|
676
|
+
/**
|
|
677
|
+
* Status
|
|
678
|
+
*/
|
|
679
|
+
status?: string;
|
|
680
|
+
/**
|
|
681
|
+
* Validation Errors
|
|
682
|
+
*/
|
|
683
|
+
validation_errors?: Array<ValidationErrorMessage>;
|
|
684
|
+
};
|
|
685
|
+
/**
|
|
686
|
+
* AsyncTaskResponseV3
|
|
687
|
+
*/
|
|
688
|
+
type AsyncTaskResponseV3 = {
|
|
689
|
+
/**
|
|
690
|
+
* Job ID
|
|
691
|
+
*
|
|
692
|
+
* The ID of the async job.
|
|
693
|
+
*/
|
|
694
|
+
jobId: string;
|
|
695
|
+
/**
|
|
696
|
+
* Progress
|
|
697
|
+
*/
|
|
698
|
+
progress?: number;
|
|
699
|
+
/**
|
|
700
|
+
* Result
|
|
701
|
+
*
|
|
702
|
+
* The result of the job, if the job has completed.
|
|
703
|
+
*/
|
|
704
|
+
result?: GenerateImagesResponseV3 | GenerateSimilarImagesResponseV3 | ExpandImageResponseV3 | FillImageResponseV3 | GenerateObjectCompositeResponseV3;
|
|
705
|
+
/**
|
|
706
|
+
* Status of the job
|
|
707
|
+
*
|
|
708
|
+
* The status of the job.
|
|
709
|
+
*/
|
|
710
|
+
status: 'pending' | 'running' | 'succeeded' | 'failed' | 'canceled';
|
|
711
|
+
};
|
|
712
|
+
/**
|
|
713
|
+
* BaseInputImageV3
|
|
714
|
+
*/
|
|
715
|
+
type BaseInputImageV3 = {
|
|
716
|
+
/**
|
|
717
|
+
* Source image that Firefly expands, fills or uses to generate similar images.
|
|
718
|
+
*/
|
|
719
|
+
source: PublicBinaryInputV3;
|
|
720
|
+
};
|
|
721
|
+
/**
|
|
722
|
+
* BaseInputMaskV3
|
|
723
|
+
*/
|
|
724
|
+
type BaseInputMaskV3 = {
|
|
725
|
+
/**
|
|
726
|
+
* Original mask image.
|
|
727
|
+
*/
|
|
728
|
+
source?: PublicBinaryInputV3;
|
|
729
|
+
};
|
|
730
|
+
/**
|
|
731
|
+
* Body_expandImagesV3Async
|
|
732
|
+
*/
|
|
733
|
+
type BodyExpandImagesV3Async = {
|
|
734
|
+
/**
|
|
735
|
+
* Files
|
|
736
|
+
*/
|
|
737
|
+
files: Array<Blob | File>;
|
|
738
|
+
request: ExpandImageRequestV3;
|
|
739
|
+
};
|
|
740
|
+
/**
|
|
741
|
+
* Body_fillImagesV3Async
|
|
742
|
+
*/
|
|
743
|
+
type BodyFillImagesV3Async = {
|
|
744
|
+
/**
|
|
745
|
+
* Files
|
|
746
|
+
*/
|
|
747
|
+
files: Array<Blob | File>;
|
|
748
|
+
request: FillImageRequestV3;
|
|
749
|
+
};
|
|
750
|
+
/**
|
|
751
|
+
* Body_generateImagesV3Async
|
|
752
|
+
*/
|
|
753
|
+
type BodyGenerateImagesV3Async = {
|
|
754
|
+
/**
|
|
755
|
+
* Files
|
|
756
|
+
*/
|
|
757
|
+
files: Array<Blob | File>;
|
|
758
|
+
request: GenerateImagesRequestV3;
|
|
759
|
+
};
|
|
760
|
+
/**
|
|
761
|
+
* Body_generateObjectCompositeV3Async
|
|
762
|
+
*/
|
|
763
|
+
type BodyGenerateObjectCompositeV3Async = {
|
|
764
|
+
/**
|
|
765
|
+
* Files
|
|
766
|
+
*/
|
|
767
|
+
files: Array<Blob | File>;
|
|
768
|
+
request: GenerateObjectCompositeRequestV3;
|
|
769
|
+
};
|
|
770
|
+
/**
|
|
771
|
+
* Body_generateSimilarImagesV3Async
|
|
772
|
+
*/
|
|
773
|
+
type BodyGenerateSimilarImagesV3Async = {
|
|
774
|
+
/**
|
|
775
|
+
* Files
|
|
776
|
+
*/
|
|
777
|
+
files: Array<Blob | File>;
|
|
778
|
+
request: GenerateSimilarImagesRequestV3;
|
|
779
|
+
};
|
|
780
|
+
/**
|
|
781
|
+
* ColligoAsyncCancelErrorCodeV3
|
|
782
|
+
*
|
|
783
|
+
* An enumeration.
|
|
784
|
+
*/
|
|
785
|
+
type ColligoAsyncCancelErrorCodeV3 = 'job_timeout' | 'job_completed' | 'unknown_job_id' | 'job_already_canceled' | 'job_cancel_failed';
|
|
786
|
+
/**
|
|
787
|
+
* An enumeration.
|
|
788
|
+
*/
|
|
789
|
+
type ColligoErrorCodeAsyncV3 = 'validation_error' | 'runtime_error' | 'timeout_error' | 'rate_limited' | 'access_error' | 'invalid_content_type' | 'empty_input_body' | 'bad_request';
|
|
790
|
+
/**
|
|
791
|
+
* An enumeration.
|
|
792
|
+
*/
|
|
793
|
+
type ColliogAsyncStatusErrorCodeV3 = 'unknown_job_id';
|
|
794
|
+
/**
|
|
795
|
+
* The content class of the image.
|
|
796
|
+
*/
|
|
797
|
+
type ContentClassV3 = 'photo' | 'art';
|
|
798
|
+
/**
|
|
799
|
+
* Images expand payload
|
|
800
|
+
*/
|
|
801
|
+
type ExpandImageRequestV3 = {
|
|
802
|
+
/**
|
|
803
|
+
* The image to expand. Use a URL or an <code>uploadID</code> as the source for the image. Firefly only allows these listed domains for input URLs in the request: <ul> <li><code>amazonaws.com</code></li> <li><code>windows.net</code></li> <li><code>dropboxusercontent.com</code></li> <li><code>storage.googleapis.com</code></li> </ul>.
|
|
804
|
+
*/
|
|
805
|
+
image: InputImageV3;
|
|
806
|
+
/**
|
|
807
|
+
* Mask image which will be used to expand the given image.
|
|
808
|
+
*/
|
|
809
|
+
mask?: InputMaskV3;
|
|
810
|
+
/**
|
|
811
|
+
* The number of variations to generate
|
|
812
|
+
*
|
|
813
|
+
* Generate this number of variations. <code>numVariations</code> defaults to the number of seed images, or to 1 if you do not specify seeds.
|
|
814
|
+
*/
|
|
815
|
+
numVariations?: number;
|
|
816
|
+
/**
|
|
817
|
+
* The position of the source image after Firefly resizes it. The value describes the horizontal and vertical placement and dimensions of the image in the output. Note you cannot use placement for source images when you also apply a mask image.
|
|
818
|
+
*/
|
|
819
|
+
placement?: Placement;
|
|
820
|
+
/**
|
|
821
|
+
* The prompt
|
|
822
|
+
*
|
|
823
|
+
* An optional text prompt up to 1024 characters. The longer the prompt the better Firefly performs.
|
|
824
|
+
*/
|
|
825
|
+
prompt?: string;
|
|
826
|
+
/**
|
|
827
|
+
* The seed image for each variation
|
|
828
|
+
*
|
|
829
|
+
* Array of seed image IDs. These reference images help ensure consistent image generation across multiple API calls. For example, you can use the same seed to generate a similar image with different styles. If specified along with <code>numVariations</code>, the number of seeds must equal <code>numVariations</code>.
|
|
830
|
+
*/
|
|
831
|
+
seeds?: Array<number>;
|
|
832
|
+
/**
|
|
833
|
+
* The size
|
|
834
|
+
*
|
|
835
|
+
* The desired width and height for the final expanded image in pixels. The maximum size for the output images is 3999px by 3999px.
|
|
836
|
+
*/
|
|
837
|
+
size?: Size;
|
|
838
|
+
};
|
|
839
|
+
/**
|
|
840
|
+
* Images expand response
|
|
841
|
+
*/
|
|
842
|
+
type ExpandImageResponseV3 = {
|
|
843
|
+
/**
|
|
844
|
+
* The list of images
|
|
845
|
+
*
|
|
846
|
+
* Each image ID.
|
|
847
|
+
*/
|
|
848
|
+
outputs: Array<OutputImageV3>;
|
|
849
|
+
/**
|
|
850
|
+
* When you provide size as input, this value is the same.
|
|
851
|
+
*/
|
|
852
|
+
size: Size;
|
|
853
|
+
};
|
|
854
|
+
/**
|
|
855
|
+
* Fill images payload
|
|
856
|
+
*/
|
|
857
|
+
type FillImageRequestV3 = {
|
|
858
|
+
/**
|
|
859
|
+
* The image to expand. Use a URL or an <code>uploadID</code> as the source for the image. Firefly only allows these listed domains for input URLs in the request: <ul> <li><code>amazonaws.com</code></li> <li><code>windows.net</code></li> <li><code>dropboxusercontent.com</code></li> <li><code>storage.googleapis.com</code></li> </ul>.
|
|
860
|
+
*/
|
|
861
|
+
image: InputImageV3;
|
|
862
|
+
/**
|
|
863
|
+
* Required. Selected areas of a background image that Firefly uses to fill the source image.
|
|
864
|
+
*/
|
|
865
|
+
mask: InputMaskV3;
|
|
866
|
+
/**
|
|
867
|
+
* Avoid prompt
|
|
868
|
+
*
|
|
869
|
+
* An optional text prompt up to 1024 characters. Avoid these characteristics in the generated image. Not supported for Firefly Custom Models on Image Model 3 or Firefly Custom Models on Image Model 4.
|
|
870
|
+
*/
|
|
871
|
+
negativePrompt?: string;
|
|
872
|
+
/**
|
|
873
|
+
* The number of variations
|
|
874
|
+
*
|
|
875
|
+
* Generate this number of variations. <code>numVariations</code> defaults to the number of seed images, or to 1 if you do not specify seeds.
|
|
876
|
+
*/
|
|
877
|
+
numVariations?: number;
|
|
878
|
+
/**
|
|
879
|
+
* The prompt
|
|
880
|
+
*
|
|
881
|
+
* An optional text prompt up to 1024 characters. The longer the prompt the better Firefly performs.
|
|
882
|
+
*/
|
|
883
|
+
prompt?: string;
|
|
884
|
+
/**
|
|
885
|
+
* The locale used to generate an image
|
|
886
|
+
*
|
|
887
|
+
* A hyphen-separated string combining the ISO 639-1 language code and the ISO 3166-1 region, such as en-US. When a locale is set, the prompt will be biased to generate more relevant content for that region. The locale will be auto-detected if not specified based on your profile and the accepted language header.
|
|
888
|
+
*/
|
|
889
|
+
promptBiasingLocaleCode?: string;
|
|
890
|
+
/**
|
|
891
|
+
* The seed of each variation
|
|
892
|
+
*
|
|
893
|
+
* Array of seed image IDs. These reference images help ensure consistent image generation across multiple API calls. For example, you can use the same seed to generate a similar image with different styles. If specified along with <code>numVariations</code>, the number of seeds must equal <code>numVariations</code>.
|
|
894
|
+
*/
|
|
895
|
+
seeds?: Array<number>;
|
|
896
|
+
/**
|
|
897
|
+
* The size
|
|
898
|
+
*
|
|
899
|
+
* The desired width and height for the final expanded image in pixels. The supported sizes for the output images are: <ul> <li>Square (1:1) - width 2048px, height 2048px </li> <li>Square (1:1) - width 1024px, height 1024px </li> <li>Landscape (4:3) - width 2304px, height 1792px </li> <li>Portrait (3:4) - width 1792px, height 2304px</li> <li>Widescreen (16:9) - width 2688px, height 1536px </li> <li>(7:4) - width 1344px, height 768px </li> <li>(9:7) - width 1152px, height 896px </li> <li>(7:9) - width 896px, height 1152px</li> </ul>.
|
|
900
|
+
*/
|
|
901
|
+
size?: Size;
|
|
902
|
+
};
|
|
903
|
+
/**
|
|
904
|
+
* Fill images response.
|
|
905
|
+
*/
|
|
906
|
+
type FillImageResponseV3 = {
|
|
907
|
+
/**
|
|
908
|
+
* The list of images
|
|
909
|
+
*
|
|
910
|
+
* Each image ID.
|
|
911
|
+
*/
|
|
912
|
+
outputs: Array<OutputImageV3>;
|
|
913
|
+
/**
|
|
914
|
+
* When you provide size as input, this value is the same.
|
|
915
|
+
*/
|
|
916
|
+
size: Size;
|
|
917
|
+
};
|
|
918
|
+
/**
|
|
919
|
+
* Generating images from prompt
|
|
920
|
+
*/
|
|
921
|
+
type GenerateImagesRequestV3 = {
|
|
922
|
+
/**
|
|
923
|
+
* Directs the style of a generated image to be photographic or like fine art.
|
|
924
|
+
*/
|
|
925
|
+
contentClass?: ContentClassV3;
|
|
926
|
+
/**
|
|
927
|
+
* Include the specific custom model ID when a custom model type is designated in the `x-model-version` header parameter.
|
|
928
|
+
*/
|
|
929
|
+
customModelId?: string;
|
|
930
|
+
/**
|
|
931
|
+
* A negative prompt of things Firefly will try to avoid generating in the image. Not supported for Firefly Custom Models on Image Model 3 or Firefly Custom Models on Image Model 4.
|
|
932
|
+
*/
|
|
933
|
+
negativePrompt?: string;
|
|
934
|
+
/**
|
|
935
|
+
* The number of variations to generate. <code>numVariations</code> defaults to the number of seed images, or to 1 if you do not specify `seeds`.
|
|
936
|
+
*/
|
|
937
|
+
numVariations?: number;
|
|
938
|
+
/**
|
|
939
|
+
* A text prompt to support the generation of an image. The longer the prompt the better Firefly performs.
|
|
940
|
+
*/
|
|
941
|
+
prompt: string;
|
|
942
|
+
/**
|
|
943
|
+
* A hyphen-separated string combining the ISO 639-1 language code and the ISO 3166-1 region (like en-US). When a locale is set, the prompt will be biased to generate more relevant content for that region. If not specified, the locale will be auto-detected based on your profile and the accepted language header.
|
|
944
|
+
*/
|
|
945
|
+
promptBiasingLocaleCode?: string;
|
|
946
|
+
/**
|
|
947
|
+
* An array of seed image IDs. These reference images help ensure consistent image generation across multiple API calls. For example, use the same seed to generate a similar image in different styles. If specified along with <code>numVariations</code>, the number of seeds provided must equal <code>numVariations</code>.
|
|
948
|
+
*/
|
|
949
|
+
seeds?: Array<number>;
|
|
950
|
+
/**
|
|
951
|
+
* The desired width and height for the final image, in pixels. Supported sizes for the output images with `image3` are: <ul> <li>Square (1:1) - width 2048px, height 2048px </li> <li>Square (1:1) - width 1024px, height 1024px </li> <li>Landscape (4:3) - width 2304px, height 1792px </li> <li>Portrait (3:4) - width 1792px, height 2304px</li> <li>Widescreen (16:9) - width 2688px, height 1536px </li> <li>Widescreen (16:9) - width 2688px, height 1512px </li> <li>(7:4) - width 1344px, height 768px </li> <li>(7:4) - width 1344px, height 756px </li> <li>(9:7) - width 1152px, height 896px </li> <li>(7:9) - width 896px, height 1152px</li> </ul> Supported sizes for the output images with `image4` are: <ul> <li>(1:1) - width 2048px, height 2048px</li> <li>(4:3) - width 2304px, height 1792px</li> <li>(3:4) - width 1792px, height 2304px</li> <li>(16:9) - width 2688px, height 1536px</li> <li>(9:16) - width 1440px, height 2560px</li> </ul>.
|
|
952
|
+
*/
|
|
953
|
+
size?: Size;
|
|
954
|
+
/**
|
|
955
|
+
* An object with the reference image details for structure.
|
|
956
|
+
*/
|
|
957
|
+
structure?: StructureReferenceV3;
|
|
958
|
+
/**
|
|
959
|
+
* An object with the reference image details for style.
|
|
960
|
+
*/
|
|
961
|
+
style?: StylesV3;
|
|
962
|
+
/**
|
|
963
|
+
* Only supported with the model version `image4_custom`. The `default` setting upscales generated images to 2k. The `low_creativity` setting refines the image generation by removing distortions, smoothing textures, and sometimes adding details (like freckles to faces in close-up). This setting is recommended for generating images with human subjects.
|
|
964
|
+
*/
|
|
965
|
+
upsamplerType?: 'default' | 'low_creativity';
|
|
966
|
+
/**
|
|
967
|
+
* Adjust the overall intensity of your photo's characteristics, such as contrast, shadow, and hue. This is not supported with the model version `image4_custom`.
|
|
968
|
+
*/
|
|
969
|
+
visualIntensity?: number;
|
|
970
|
+
};
|
|
971
|
+
/**
|
|
972
|
+
* Generating images from prompt
|
|
973
|
+
*/
|
|
974
|
+
type GenerateImagesResponseV3 = {
|
|
975
|
+
/**
|
|
976
|
+
* Generate an image to being more photographic or more like art. Either <code>photo</code> or <code>art</code>.
|
|
977
|
+
*/
|
|
978
|
+
contentClass?: ContentClassV3;
|
|
979
|
+
/**
|
|
980
|
+
* List of images
|
|
981
|
+
*
|
|
982
|
+
* Each image ID.
|
|
983
|
+
*/
|
|
984
|
+
outputs: Array<OutputImageV3>;
|
|
985
|
+
/**
|
|
986
|
+
* The prompt had artists that were blocked
|
|
987
|
+
*
|
|
988
|
+
* The generated image does not comply with its full prompt if the prompt names artists that are blocked.
|
|
989
|
+
*/
|
|
990
|
+
promptHasBlockedArtists?: boolean;
|
|
991
|
+
/**
|
|
992
|
+
* The prompt had denied words
|
|
993
|
+
*
|
|
994
|
+
* The generated image does not comply with its full prompt if the prompt contains blocked words or descriptions.
|
|
995
|
+
*/
|
|
996
|
+
promptHasDeniedWords?: boolean;
|
|
997
|
+
size: Size;
|
|
998
|
+
};
|
|
999
|
+
/**
|
|
1000
|
+
* Generate object composite from prompt request
|
|
1001
|
+
*/
|
|
1002
|
+
type GenerateObjectCompositeRequestV3 = {
|
|
1003
|
+
contentClass?: ContentClassV3;
|
|
1004
|
+
/**
|
|
1005
|
+
* The image to expand. Use a URL or an <code>uploadID</code> as the source for the image. Firefly only allows these listed domains for input URLs in the request: <ul> <li><code>amazonaws.com</code></li> <li><code>windows.net</code></li> <li><code>dropboxusercontent.com</code></li> <li><code>storage.googleapis.com</code></li> </ul>.
|
|
1006
|
+
*/
|
|
1007
|
+
image: InputImageV3;
|
|
1008
|
+
/**
|
|
1009
|
+
* Selected areas of a background image that Firefly uses to fill the source image.
|
|
1010
|
+
*/
|
|
1011
|
+
mask?: BaseInputMaskV3;
|
|
1012
|
+
/**
|
|
1013
|
+
* The number of variations to generate
|
|
1014
|
+
*
|
|
1015
|
+
* Generate this number of variations. Defaults to the number of seed images, or to 1 if you do not specify seeds.
|
|
1016
|
+
*/
|
|
1017
|
+
numVariations?: number;
|
|
1018
|
+
/**
|
|
1019
|
+
* The position of the source image after Firefly adjusts it. The value describes the horizontal and vertical placement and dimensions of the image in the output. Note you cannot use placement for source images when you also apply a mask image.
|
|
1020
|
+
*/
|
|
1021
|
+
placement?: Placement;
|
|
1022
|
+
/**
|
|
1023
|
+
* The prompt
|
|
1024
|
+
*
|
|
1025
|
+
* A text prompt up to 1024 characters. The longer the prompt the better Firefly performs.
|
|
1026
|
+
*/
|
|
1027
|
+
prompt: string;
|
|
1028
|
+
/**
|
|
1029
|
+
* The seed image for each variation
|
|
1030
|
+
*
|
|
1031
|
+
* Array of seed image IDs. These reference images help ensure consistent image generation across multiple API calls.
|
|
1032
|
+
*
|
|
1033
|
+
* If specified along with <code>numVariations</code>, the number of seeds must equal <code>numVariations</code>.
|
|
1034
|
+
*/
|
|
1035
|
+
seeds?: Array<number>;
|
|
1036
|
+
/**
|
|
1037
|
+
* The size
|
|
1038
|
+
*
|
|
1039
|
+
* The desired width and height for the final image in pixels. The supported sizes for the output images are: <ul> <li>Square (1:1) - width 2048px, height 2048px </li> <li>Square (1:1) - width 1024px, height 1024px </li> <li>Landscape (4:3) - width 2304px, height 1792px </li> <li>Portrait (3:4) - width 1792px, height 2304px</li> <li>Widescreen (16:9) - width 2688px, height 1536px </li> <li>(7:4) - width 1344px, height 768px </li> <li>(9:7) - width 1152px, height 896px </li> <li>(7:9) - width 896px, height 1152px</li> </ul>.
|
|
1040
|
+
*/
|
|
1041
|
+
size?: Size;
|
|
1042
|
+
style?: StylesV3;
|
|
1043
|
+
};
|
|
1044
|
+
/**
|
|
1045
|
+
* Generate object composite from prompt response
|
|
1046
|
+
*/
|
|
1047
|
+
type GenerateObjectCompositeResponseV3 = {
|
|
1048
|
+
contentClass?: ContentClassV3;
|
|
1049
|
+
/**
|
|
1050
|
+
* The list of images
|
|
1051
|
+
*
|
|
1052
|
+
* Each image ID.
|
|
1053
|
+
*/
|
|
1054
|
+
outputs: Array<OutputImageV3>;
|
|
1055
|
+
/**
|
|
1056
|
+
* When you provide size as input, this value is the same.
|
|
1057
|
+
*/
|
|
1058
|
+
size: Size;
|
|
1059
|
+
};
|
|
1060
|
+
/**
|
|
1061
|
+
* Generating similar images from a reference image
|
|
1062
|
+
*/
|
|
1063
|
+
type GenerateSimilarImagesRequestV3 = {
|
|
1064
|
+
/**
|
|
1065
|
+
* Firefly will create similar variations. Use a URL or an <code>uploadID</code> as the source for the image. Firefly only allows these listed domains: <ul> <li><code>amazonaws.com</code></li> <li><code>windows.net</code></li> <li><code>dropboxusercontent.com</code></li> <li><code>storage.googleapis.com</code></li> </ul>.
|
|
1066
|
+
*/
|
|
1067
|
+
image: BaseInputImageV3;
|
|
1068
|
+
/**
|
|
1069
|
+
* The number of variations
|
|
1070
|
+
*
|
|
1071
|
+
* Generate this number of variations. <code>numVariations</code> defaults to the number of seed images, or to 1 if you do not specify `seeds`.
|
|
1072
|
+
*/
|
|
1073
|
+
numVariations?: number;
|
|
1074
|
+
/**
|
|
1075
|
+
* The seed image for each variation
|
|
1076
|
+
*
|
|
1077
|
+
* Array of seed image IDs. These reference images help ensure consistent image generation across multiple API calls. If specified along with <code>numVariations</code>, the number of seeds must equal <code>numVariations</code>.
|
|
1078
|
+
*/
|
|
1079
|
+
seeds?: Array<number>;
|
|
1080
|
+
/**
|
|
1081
|
+
* The size
|
|
1082
|
+
*
|
|
1083
|
+
* The desired width and height for the final image in pixels. The supported sizes for the output images are: <ul> <li>Square (1:1) - width 2048px, height 2048px </li> <li>Square (1:1) - width 1024px, height 1024px </li> <li>Landscape (4:3) - width 2304px, height 1792px </li> <li>Portrait (3:4) - width 1792px, height 2304px</li> <li>Widescreen (16:9) - width 2688px, height 1536px </li> <li>(7:4) - width 1344px, height 768px </li> <li>(9:7) - width 1152px, height 896px </li> <li>(7:9) - width 896px, height 1152px</li> </ul>.
|
|
1084
|
+
*/
|
|
1085
|
+
size?: Size;
|
|
1086
|
+
};
|
|
1087
|
+
/**
|
|
1088
|
+
* Generating similar images response
|
|
1089
|
+
*/
|
|
1090
|
+
type GenerateSimilarImagesResponseV3 = {
|
|
1091
|
+
/**
|
|
1092
|
+
* The list of images
|
|
1093
|
+
*
|
|
1094
|
+
* Each image ID.
|
|
1095
|
+
*/
|
|
1096
|
+
outputs: Array<OutputImageV3>;
|
|
1097
|
+
/**
|
|
1098
|
+
* When you provide size as input, this value is the same.
|
|
1099
|
+
*/
|
|
1100
|
+
size: Size;
|
|
1101
|
+
};
|
|
1102
|
+
/**
|
|
1103
|
+
* HTTPValidationError
|
|
1104
|
+
*/
|
|
1105
|
+
type HttpValidationError = {
|
|
1106
|
+
/**
|
|
1107
|
+
* Detail
|
|
1108
|
+
*/
|
|
1109
|
+
detail?: Array<ValidationError>;
|
|
1110
|
+
};
|
|
1111
|
+
/**
|
|
1112
|
+
* InputImageV3
|
|
1113
|
+
*/
|
|
1114
|
+
type InputImageV3 = {
|
|
1115
|
+
/**
|
|
1116
|
+
* Deprecated mask image
|
|
1117
|
+
*
|
|
1118
|
+
* This is a deprecated property. Use <code>mask</code> instead.
|
|
1119
|
+
*
|
|
1120
|
+
* @deprecated
|
|
1121
|
+
*/
|
|
1122
|
+
mask?: PublicBinaryInputV3;
|
|
1123
|
+
/**
|
|
1124
|
+
* Source image that Firefly expands, fills, or uses to generate similar images.
|
|
1125
|
+
*/
|
|
1126
|
+
source: PublicBinaryInputV3;
|
|
1127
|
+
};
|
|
1128
|
+
/**
|
|
1129
|
+
* InputMaskV3
|
|
1130
|
+
*/
|
|
1131
|
+
type InputMaskV3 = {
|
|
1132
|
+
/**
|
|
1133
|
+
* Invert mask
|
|
1134
|
+
*
|
|
1135
|
+
* Invert mask is an optional boolen property, use <code>true</code> if you want take an image mask, invert it and apply it.
|
|
1136
|
+
*/
|
|
1137
|
+
invert?: boolean;
|
|
1138
|
+
source: PublicBinaryInputV3;
|
|
1139
|
+
};
|
|
1140
|
+
/**
|
|
1141
|
+
* OutputImageV3
|
|
1142
|
+
*/
|
|
1143
|
+
type OutputImageV3 = {
|
|
1144
|
+
image: PublicBinaryOutputV3;
|
|
1145
|
+
/**
|
|
1146
|
+
* Seed
|
|
1147
|
+
*/
|
|
1148
|
+
seed: number;
|
|
1149
|
+
};
|
|
1150
|
+
/**
|
|
1151
|
+
* Placement
|
|
1152
|
+
*/
|
|
1153
|
+
type Placement = {
|
|
1154
|
+
/**
|
|
1155
|
+
* Alignment
|
|
1156
|
+
*
|
|
1157
|
+
* Specify horizontal and vertical alignment. Possible values for horizontal=(center|left|right) and for vertical=(center|top|bottom).
|
|
1158
|
+
*/
|
|
1159
|
+
alignment?: PlacementAlignment;
|
|
1160
|
+
/**
|
|
1161
|
+
* Margin values in target size
|
|
1162
|
+
*
|
|
1163
|
+
* Margin values in target size.
|
|
1164
|
+
*/
|
|
1165
|
+
inset?: PlacementInset;
|
|
1166
|
+
};
|
|
1167
|
+
/**
|
|
1168
|
+
* PlacementAlignment
|
|
1169
|
+
*/
|
|
1170
|
+
type PlacementAlignment = {
|
|
1171
|
+
horizontal?: AlignmentHorizontal;
|
|
1172
|
+
vertical?: AlignmentVertical;
|
|
1173
|
+
};
|
|
1174
|
+
/**
|
|
1175
|
+
* PlacementInset
|
|
1176
|
+
*/
|
|
1177
|
+
type PlacementInset = {
|
|
1178
|
+
/**
|
|
1179
|
+
* Bottom Inset
|
|
1180
|
+
*
|
|
1181
|
+
* The space between bottom edge of the result image and bottom edge of the placed object image.
|
|
1182
|
+
*/
|
|
1183
|
+
bottom?: number;
|
|
1184
|
+
/**
|
|
1185
|
+
* Left Inset
|
|
1186
|
+
*
|
|
1187
|
+
* The space between left edge of the result image and left edge of the placed object image.
|
|
1188
|
+
*/
|
|
1189
|
+
left?: number;
|
|
1190
|
+
/**
|
|
1191
|
+
* Right Inset
|
|
1192
|
+
*
|
|
1193
|
+
* The space between right edge of the result image and right edge of the placed object image.
|
|
1194
|
+
*/
|
|
1195
|
+
right?: number;
|
|
1196
|
+
/**
|
|
1197
|
+
* Top Inset
|
|
1198
|
+
*
|
|
1199
|
+
* The space between top edge of the result image and top edge of the placed object image.
|
|
1200
|
+
*/
|
|
1201
|
+
top?: number;
|
|
1202
|
+
};
|
|
1203
|
+
/**
|
|
1204
|
+
* PublicBinaryInputV3
|
|
1205
|
+
*/
|
|
1206
|
+
type PublicBinaryInputV3 = {
|
|
1207
|
+
/**
|
|
1208
|
+
* The upload ID
|
|
1209
|
+
*
|
|
1210
|
+
* The `uploadId` from the storage API response.
|
|
1211
|
+
*/
|
|
1212
|
+
uploadId?: string;
|
|
1213
|
+
/**
|
|
1214
|
+
* The pre-signed URL
|
|
1215
|
+
*
|
|
1216
|
+
* The pre-signed URL of an uploaded file. Use a URL or an `uploadID` as the source for the image. Firefly only allows these listed domains in the request: <ul> <li><code>amazonaws.com</code></li> <li><code>windows.net</code></li> <li><code>dropboxusercontent.com</code></li> <li><code>storage.googleapis.com</code></li> </ul>.
|
|
1217
|
+
*/
|
|
1218
|
+
url?: string;
|
|
1219
|
+
};
|
|
1220
|
+
/**
|
|
1221
|
+
* PublicBinaryOutputV3
|
|
1222
|
+
*/
|
|
1223
|
+
type PublicBinaryOutputV3 = {
|
|
1224
|
+
/**
|
|
1225
|
+
* The pre-signed URL
|
|
1226
|
+
*
|
|
1227
|
+
* This URL expires in one hour.
|
|
1228
|
+
*/
|
|
1229
|
+
url?: string;
|
|
1230
|
+
};
|
|
1231
|
+
type Size = {
|
|
1232
|
+
height: number;
|
|
1233
|
+
width: number;
|
|
1234
|
+
};
|
|
1235
|
+
type StructureImageReferenceV3 = {
|
|
1236
|
+
source?: PublicBinaryInputV3;
|
|
1237
|
+
};
|
|
1238
|
+
type StructureReferenceV3 = {
|
|
1239
|
+
imageReference?: StructureImageReferenceV3;
|
|
1240
|
+
/**
|
|
1241
|
+
* Adherence Threshold
|
|
1242
|
+
*
|
|
1243
|
+
* Control how strictly Firefly adheres to the reference image when it generates the image variations. 0 means no adherence. 100 means full adherence.
|
|
1244
|
+
*/
|
|
1245
|
+
strength?: number;
|
|
1246
|
+
};
|
|
1247
|
+
type StylesImageReferenceV3 = {
|
|
1248
|
+
source?: PublicBinaryInputV3;
|
|
1249
|
+
};
|
|
1250
|
+
type StylesV3 = {
|
|
1251
|
+
imageReference?: StylesImageReferenceV3;
|
|
1252
|
+
/**
|
|
1253
|
+
* The style presets. Specify an ID for a style of image to generate.
|
|
1254
|
+
*/
|
|
1255
|
+
presets?: Array<string>;
|
|
1256
|
+
/**
|
|
1257
|
+
* How strictly Firefly should adhere to the style you provide. 0 means no adherence. 100 means full adherence.
|
|
1258
|
+
*/
|
|
1259
|
+
strength?: number;
|
|
1260
|
+
};
|
|
1261
|
+
/**
|
|
1262
|
+
* ValidationError
|
|
1263
|
+
*/
|
|
1264
|
+
type ValidationError = {
|
|
1265
|
+
/**
|
|
1266
|
+
* Location
|
|
1267
|
+
*/
|
|
1268
|
+
loc: Array<string | number>;
|
|
1269
|
+
/**
|
|
1270
|
+
* Message
|
|
1271
|
+
*/
|
|
1272
|
+
msg: string;
|
|
1273
|
+
/**
|
|
1274
|
+
* Error Type
|
|
1275
|
+
*/
|
|
1276
|
+
type: string;
|
|
1277
|
+
};
|
|
1278
|
+
/**
|
|
1279
|
+
* ValidationErrorMessage
|
|
1280
|
+
*/
|
|
1281
|
+
type ValidationErrorMessage = {
|
|
1282
|
+
/**
|
|
1283
|
+
* Ctx
|
|
1284
|
+
*/
|
|
1285
|
+
ctx?: {
|
|
1286
|
+
[key: string]: unknown;
|
|
1287
|
+
};
|
|
1288
|
+
/**
|
|
1289
|
+
* Loc
|
|
1290
|
+
*/
|
|
1291
|
+
loc: Array<number | string>;
|
|
1292
|
+
/**
|
|
1293
|
+
* Msg
|
|
1294
|
+
*/
|
|
1295
|
+
msg: string;
|
|
1296
|
+
/**
|
|
1297
|
+
* Type
|
|
1298
|
+
*/
|
|
1299
|
+
type: string;
|
|
1300
|
+
};
|
|
1301
|
+
/**
|
|
1302
|
+
* Generating video from prompt
|
|
1303
|
+
*/
|
|
1304
|
+
type GenerateVideoRequestV3 = {
|
|
1305
|
+
/**
|
|
1306
|
+
* The constant rate factor for encoding video. 0 indicates a lossless generation, with the highest quality and largest file size. 63 indicates the worst quality generation with the smallest file size. The suggested value range is 17-23.
|
|
1307
|
+
*/
|
|
1308
|
+
bitRateFactor?: number;
|
|
1309
|
+
/**
|
|
1310
|
+
* The details of the image used as a keyframe for the generated video. Provided images are used as a first frame or final frame to guide the video generation.
|
|
1311
|
+
*/
|
|
1312
|
+
image?: InputImageVideoV3;
|
|
1313
|
+
/**
|
|
1314
|
+
* The prompt used to generate the video. The longer the prompt, the better.
|
|
1315
|
+
*/
|
|
1316
|
+
prompt?: string;
|
|
1317
|
+
/**
|
|
1318
|
+
* The seed reference value. Currently only 1 seed is supported.
|
|
1319
|
+
*/
|
|
1320
|
+
seeds?: [number];
|
|
1321
|
+
/**
|
|
1322
|
+
* The dimensions of the generated video.
|
|
1323
|
+
*/
|
|
1324
|
+
sizes?: Array<ClinetoSize>;
|
|
1325
|
+
/**
|
|
1326
|
+
* The camera and shot control settings.
|
|
1327
|
+
*/
|
|
1328
|
+
videoSettings?: VideoSettingsV3;
|
|
1329
|
+
};
|
|
1330
|
+
/**
|
|
1331
|
+
* ClinetoSize
|
|
1332
|
+
*/
|
|
1333
|
+
type ClinetoSize = {
|
|
1334
|
+
/**
|
|
1335
|
+
* The height of the output video.
|
|
1336
|
+
*/
|
|
1337
|
+
height: number;
|
|
1338
|
+
/**
|
|
1339
|
+
* The width of the output video.
|
|
1340
|
+
*/
|
|
1341
|
+
width: number;
|
|
1342
|
+
};
|
|
1343
|
+
/**
|
|
1344
|
+
* InputImageVideoV3
|
|
1345
|
+
*/
|
|
1346
|
+
type InputImageVideoV3 = {
|
|
1347
|
+
/**
|
|
1348
|
+
* The details about the keyframe images used for the video generation.
|
|
1349
|
+
*/
|
|
1350
|
+
conditions?: Array<ImageConditionV3>;
|
|
1351
|
+
};
|
|
1352
|
+
/**
|
|
1353
|
+
* ImageConditionV3
|
|
1354
|
+
*/
|
|
1355
|
+
type ImageConditionV3 = {
|
|
1356
|
+
/**
|
|
1357
|
+
* Details about the timeline placement of the image.
|
|
1358
|
+
*/
|
|
1359
|
+
placement: PlacementStart;
|
|
1360
|
+
/**
|
|
1361
|
+
* The source details of the image.
|
|
1362
|
+
*/
|
|
1363
|
+
source: PublicBinaryInputV3;
|
|
1364
|
+
};
|
|
1365
|
+
/**
|
|
1366
|
+
* PlacementStart
|
|
1367
|
+
*/
|
|
1368
|
+
type PlacementStart = {
|
|
1369
|
+
/**
|
|
1370
|
+
* The position of the image on the timeline for the generated video, 0 being the first frame and 1 being the last frame.
|
|
1371
|
+
*/
|
|
1372
|
+
position: number;
|
|
1373
|
+
};
|
|
1374
|
+
type VideoSettingsV3 = {
|
|
1375
|
+
/**
|
|
1376
|
+
* The camera motion control.
|
|
1377
|
+
*/
|
|
1378
|
+
cameraMotion?: CameraMotion;
|
|
1379
|
+
/**
|
|
1380
|
+
* The style of the generated video.
|
|
1381
|
+
*/
|
|
1382
|
+
promptStyle?: VideoPromptStyle;
|
|
1383
|
+
/**
|
|
1384
|
+
* The shot angle control.
|
|
1385
|
+
*/
|
|
1386
|
+
shotAngle?: ShotAngle;
|
|
1387
|
+
/**
|
|
1388
|
+
* The shot size control.
|
|
1389
|
+
*/
|
|
1390
|
+
shotSize?: ShotSize;
|
|
1391
|
+
};
|
|
1392
|
+
/**
|
|
1393
|
+
* CameraMotion
|
|
1394
|
+
*/
|
|
1395
|
+
type CameraMotion = 'camera pan left' | 'camera pan right' | 'camera zoom in' | 'camera zoom out' | 'camera tilt up' | 'camera tilt down' | 'camera locked down' | 'camera handheld';
|
|
1396
|
+
/**
|
|
1397
|
+
* VideoPromptStyle
|
|
1398
|
+
*/
|
|
1399
|
+
type VideoPromptStyle = 'anime' | '3d' | 'fantasy' | 'cinematic' | 'claymation' | 'line art' | 'stop motion' | '2d' | 'vector art' | 'black and white';
|
|
1400
|
+
/**
|
|
1401
|
+
* ShotAngle
|
|
1402
|
+
*/
|
|
1403
|
+
type ShotAngle = 'aerial shot' | 'eye_level shot' | 'high angle shot' | 'low angle shot' | 'top-down shot';
|
|
1404
|
+
/**
|
|
1405
|
+
* ShotSize
|
|
1406
|
+
*/
|
|
1407
|
+
type ShotSize = 'close-up shot' | 'extreme close-up' | 'medium shot' | 'long shot' | 'extreme long shot';
|
|
1408
|
+
/**
|
|
1409
|
+
* VideoResult
|
|
1410
|
+
*/
|
|
1411
|
+
type VideoResult = {
|
|
1412
|
+
/**
|
|
1413
|
+
* The pre-signed URL for the generated video file.
|
|
1414
|
+
*/
|
|
1415
|
+
url: string;
|
|
1416
|
+
};
|
|
1417
|
+
/**
|
|
1418
|
+
* VideoOutput
|
|
1419
|
+
*/
|
|
1420
|
+
type VideoOutput = {
|
|
1421
|
+
/**
|
|
1422
|
+
* The seed value used for generating this video output.
|
|
1423
|
+
*/
|
|
1424
|
+
seed: number;
|
|
1425
|
+
video: VideoResult;
|
|
1426
|
+
};
|
|
1427
|
+
/**
|
|
1428
|
+
* AsyncResult
|
|
1429
|
+
*/
|
|
1430
|
+
type AsyncResult = {
|
|
1431
|
+
size: ClinetoSize;
|
|
1432
|
+
/**
|
|
1433
|
+
* Array of generated video outputs.
|
|
1434
|
+
*/
|
|
1435
|
+
outputs: Array<VideoOutput>;
|
|
1436
|
+
};
|
|
1437
|
+
/**
|
|
1438
|
+
* AsyncResponseV3
|
|
1439
|
+
*/
|
|
1440
|
+
type AsyncResponseV3 = {
|
|
1441
|
+
/**
|
|
1442
|
+
* Cancel URL
|
|
1443
|
+
*
|
|
1444
|
+
* A URL to cancel the job.
|
|
1445
|
+
*/
|
|
1446
|
+
cancelUrl?: string;
|
|
1447
|
+
/**
|
|
1448
|
+
* Job ID
|
|
1449
|
+
*
|
|
1450
|
+
* The ID for the asynchronous job.
|
|
1451
|
+
*/
|
|
1452
|
+
jobId: string;
|
|
1453
|
+
/**
|
|
1454
|
+
* The progress of the running job. The value is the percentage of the job that has been completed.
|
|
1455
|
+
*/
|
|
1456
|
+
progress?: number;
|
|
1457
|
+
/**
|
|
1458
|
+
* The result of the completed job.
|
|
1459
|
+
*/
|
|
1460
|
+
result?: AsyncResult;
|
|
1461
|
+
/**
|
|
1462
|
+
* Status
|
|
1463
|
+
*
|
|
1464
|
+
* The status of the job.
|
|
1465
|
+
*/
|
|
1466
|
+
status?: string;
|
|
1467
|
+
/**
|
|
1468
|
+
* Status URL
|
|
1469
|
+
*
|
|
1470
|
+
* A URL to show the status of the current job.
|
|
1471
|
+
*/
|
|
1472
|
+
statusUrl?: string;
|
|
1473
|
+
};
|
|
1474
|
+
/**
|
|
1475
|
+
* ErrorResponse
|
|
1476
|
+
*/
|
|
1477
|
+
type ErrorResponse = {
|
|
1478
|
+
/**
|
|
1479
|
+
* The type of error that occurred.
|
|
1480
|
+
*/
|
|
1481
|
+
reason?: string;
|
|
1482
|
+
/**
|
|
1483
|
+
* A message describing the error.
|
|
1484
|
+
*/
|
|
1485
|
+
message?: string;
|
|
1486
|
+
};
|
|
1487
|
+
/**
|
|
1488
|
+
* CustomModelsFF3pInfo
|
|
1489
|
+
*/
|
|
1490
|
+
type CustomModelsFf3pInfo = {
|
|
1491
|
+
/**
|
|
1492
|
+
* List of custom models.
|
|
1493
|
+
*/
|
|
1494
|
+
custom_models?: Array<CustomModelFf3pInfo>;
|
|
1495
|
+
_links?: Links;
|
|
1496
|
+
/**
|
|
1497
|
+
* Total number of results for the query.
|
|
1498
|
+
*/
|
|
1499
|
+
total_count?: number;
|
|
1500
|
+
};
|
|
1501
|
+
/**
|
|
1502
|
+
* CustomModelFF3pInfo
|
|
1503
|
+
*
|
|
1504
|
+
* Custom Model info.
|
|
1505
|
+
*/
|
|
1506
|
+
type CustomModelFf3pInfo = {
|
|
1507
|
+
/**
|
|
1508
|
+
* Custom Model version.
|
|
1509
|
+
*/
|
|
1510
|
+
version?: string;
|
|
1511
|
+
/**
|
|
1512
|
+
* Custom Model name.
|
|
1513
|
+
*/
|
|
1514
|
+
assetName?: string;
|
|
1515
|
+
/**
|
|
1516
|
+
* The storage amount used.
|
|
1517
|
+
*/
|
|
1518
|
+
size?: number;
|
|
1519
|
+
/**
|
|
1520
|
+
* An identifier for the specific version of the asset.
|
|
1521
|
+
*/
|
|
1522
|
+
etag?: string;
|
|
1523
|
+
/**
|
|
1524
|
+
* The training mode of the model. When this is 'subject', the 'conceptId' must be mentioned in the prompt.
|
|
1525
|
+
*/
|
|
1526
|
+
trainingMode?: 'subject' | 'style';
|
|
1527
|
+
/**
|
|
1528
|
+
* A unique identifier for the asset.
|
|
1529
|
+
*/
|
|
1530
|
+
assetId?: string;
|
|
1531
|
+
/**
|
|
1532
|
+
* The media type specific to the asset.
|
|
1533
|
+
*/
|
|
1534
|
+
mediaType?: string;
|
|
1535
|
+
createdDate?: string;
|
|
1536
|
+
modifiedDate?: string;
|
|
1537
|
+
/**
|
|
1538
|
+
* Status for the asset. The 'unpublished' value applies when an asset is published and then subsequently revoked.
|
|
1539
|
+
*/
|
|
1540
|
+
publishedState?: 'never' | 'published' | 'unpublished';
|
|
1541
|
+
/**
|
|
1542
|
+
* The underlying GenAI model used to train the Custom Model.
|
|
1543
|
+
*/
|
|
1544
|
+
baseModel?: BaseModel;
|
|
1545
|
+
/**
|
|
1546
|
+
* Example string provided by the custom model's trainer.
|
|
1547
|
+
*/
|
|
1548
|
+
samplePrompt?: string;
|
|
1549
|
+
/**
|
|
1550
|
+
* The asset name provided by the user, mapped from the name of the training set library.
|
|
1551
|
+
*/
|
|
1552
|
+
displayName?: string;
|
|
1553
|
+
/**
|
|
1554
|
+
* When 'trainingMode' is 'subject', this string specifies the subject for the prompt.
|
|
1555
|
+
*/
|
|
1556
|
+
conceptId?: string;
|
|
1557
|
+
};
|
|
1558
|
+
/**
|
|
1559
|
+
* BaseModel
|
|
1560
|
+
*/
|
|
1561
|
+
type BaseModel = {
|
|
1562
|
+
/**
|
|
1563
|
+
* The name of the base model.
|
|
1564
|
+
*/
|
|
1565
|
+
name?: string;
|
|
1566
|
+
/**
|
|
1567
|
+
* The version of the base model.
|
|
1568
|
+
*/
|
|
1569
|
+
version?: string;
|
|
1570
|
+
};
|
|
1571
|
+
/**
|
|
1572
|
+
* Links
|
|
1573
|
+
*
|
|
1574
|
+
* Collection of hypermedia links for pagination, navigation, etc.
|
|
1575
|
+
*/
|
|
1576
|
+
type Links = {
|
|
1577
|
+
page?: Link;
|
|
1578
|
+
next?: Link;
|
|
1579
|
+
};
|
|
1580
|
+
/**
|
|
1581
|
+
* Link
|
|
1582
|
+
*
|
|
1583
|
+
* Standard representation of a hypermedia link.
|
|
1584
|
+
*/
|
|
1585
|
+
type Link = {
|
|
1586
|
+
/**
|
|
1587
|
+
* Fully qualified URI or relative path for the link.
|
|
1588
|
+
*/
|
|
1589
|
+
href?: string;
|
|
1590
|
+
/**
|
|
1591
|
+
* Describes the relationship or function of the link (e.g. `next`, `page`, `self`).
|
|
1592
|
+
*/
|
|
1593
|
+
rel?: string;
|
|
1594
|
+
/**
|
|
1595
|
+
* Indicates whether or not the `href` supports URI template parameters.
|
|
1596
|
+
*/
|
|
1597
|
+
templated?: boolean;
|
|
1598
|
+
};
|
|
1599
|
+
/**
|
|
1600
|
+
* PageSpec
|
|
1601
|
+
*
|
|
1602
|
+
* List Page.
|
|
1603
|
+
*/
|
|
1604
|
+
type PageSpec = {
|
|
1605
|
+
/**
|
|
1606
|
+
* List order-by.
|
|
1607
|
+
*/
|
|
1608
|
+
orderBy?: string;
|
|
1609
|
+
/**
|
|
1610
|
+
* List start position.
|
|
1611
|
+
*/
|
|
1612
|
+
start?: string;
|
|
1613
|
+
/**
|
|
1614
|
+
* List next position.
|
|
1615
|
+
*/
|
|
1616
|
+
next?: string;
|
|
1617
|
+
/**
|
|
1618
|
+
* List page size.
|
|
1619
|
+
*/
|
|
1620
|
+
count?: number;
|
|
1621
|
+
/**
|
|
1622
|
+
* List page type.
|
|
1623
|
+
*/
|
|
1624
|
+
type?: string;
|
|
1625
|
+
/**
|
|
1626
|
+
* List page property.
|
|
1627
|
+
*/
|
|
1628
|
+
property?: string;
|
|
1629
|
+
};
|
|
1630
|
+
/**
|
|
1631
|
+
* StorageImageResponse
|
|
1632
|
+
*
|
|
1633
|
+
* Storage response.
|
|
1634
|
+
*/
|
|
1635
|
+
type StorageImageResponse = {
|
|
1636
|
+
/**
|
|
1637
|
+
* Array of objects containing asset ID.
|
|
1638
|
+
*/
|
|
1639
|
+
images?: Array<StorageImage>;
|
|
1640
|
+
};
|
|
1641
|
+
/**
|
|
1642
|
+
* StorageImage
|
|
1643
|
+
*
|
|
1644
|
+
* Source image.
|
|
1645
|
+
*/
|
|
1646
|
+
type StorageImage = {
|
|
1647
|
+
/**
|
|
1648
|
+
* ID associated with the asset. The id will be valid for 7 days from the date of creation.
|
|
1649
|
+
*/
|
|
1650
|
+
id: string;
|
|
1651
|
+
};
|
|
1652
|
+
/**
|
|
1653
|
+
* ErrorBody
|
|
1654
|
+
*/
|
|
1655
|
+
type ErrorBody = {
|
|
1656
|
+
/**
|
|
1657
|
+
* Error message.
|
|
1658
|
+
*/
|
|
1659
|
+
message?: string;
|
|
1660
|
+
/**
|
|
1661
|
+
* Associated error code.
|
|
1662
|
+
*/
|
|
1663
|
+
error_code?: string;
|
|
1664
|
+
};
|
|
1665
|
+
type GenerateImagesV3AsyncData = {
|
|
1666
|
+
body: GenerateImagesRequestV3;
|
|
1667
|
+
headers?: {
|
|
1668
|
+
/**
|
|
1669
|
+
* Specify the Firefly model version to use for the image generation. When a custom model is used, a `customModelId` must also be passed in the request body.
|
|
1670
|
+
*/
|
|
1671
|
+
'x-model-version'?: 'image3' | 'image3_custom' | 'image4_standard' | 'image4_ultra' | 'image4_custom';
|
|
1672
|
+
};
|
|
1673
|
+
path?: never;
|
|
1674
|
+
query?: never;
|
|
1675
|
+
url: '/v3/images/generate-async';
|
|
1676
|
+
};
|
|
1677
|
+
type GenerateImagesV3AsyncErrors = {
|
|
1678
|
+
/**
|
|
1679
|
+
* Bad Request
|
|
1680
|
+
*/
|
|
1681
|
+
400: ApiError;
|
|
1682
|
+
/**
|
|
1683
|
+
* Forbidden
|
|
1684
|
+
*/
|
|
1685
|
+
403: ApiError;
|
|
1686
|
+
/**
|
|
1687
|
+
* Request Timeout
|
|
1688
|
+
*/
|
|
1689
|
+
408: ApiError;
|
|
1690
|
+
/**
|
|
1691
|
+
* Request Entity Too Large
|
|
1692
|
+
*/
|
|
1693
|
+
413: string;
|
|
1694
|
+
/**
|
|
1695
|
+
* Unsupported Media Type
|
|
1696
|
+
*/
|
|
1697
|
+
415: ApiError;
|
|
1698
|
+
/**
|
|
1699
|
+
* Unprocessable Entity
|
|
1700
|
+
*/
|
|
1701
|
+
422: ApiError;
|
|
1702
|
+
/**
|
|
1703
|
+
* Too Many Requests
|
|
1704
|
+
*/
|
|
1705
|
+
429: ApiError;
|
|
1706
|
+
/**
|
|
1707
|
+
* Internal Server Error
|
|
1708
|
+
*/
|
|
1709
|
+
500: ApiError;
|
|
1710
|
+
};
|
|
1711
|
+
type GenerateImagesV3AsyncError = GenerateImagesV3AsyncErrors[keyof GenerateImagesV3AsyncErrors];
|
|
1712
|
+
type GenerateImagesV3AsyncResponses = {
|
|
1713
|
+
/**
|
|
1714
|
+
* Accepted
|
|
1715
|
+
*/
|
|
1716
|
+
202: AsyncAcceptResponseV3;
|
|
1717
|
+
};
|
|
1718
|
+
type GenerateImagesV3AsyncResponse = GenerateImagesV3AsyncResponses[keyof GenerateImagesV3AsyncResponses];
|
|
1719
|
+
type GenerateSimilarImagesV3AsyncData = {
|
|
1720
|
+
body: GenerateSimilarImagesRequestV3;
|
|
1721
|
+
headers?: {
|
|
1722
|
+
/**
|
|
1723
|
+
* Specify the Firefly model version to use for the image generation.
|
|
1724
|
+
*/
|
|
1725
|
+
'x-model-version'?: 'image3' | 'image4_standard' | 'image4_ultra';
|
|
1726
|
+
};
|
|
1727
|
+
path?: never;
|
|
1728
|
+
query?: never;
|
|
1729
|
+
url: '/v3/images/generate-similar-async';
|
|
1730
|
+
};
|
|
1731
|
+
type GenerateSimilarImagesV3AsyncErrors = {
|
|
1732
|
+
/**
|
|
1733
|
+
* Bad Request
|
|
1734
|
+
*/
|
|
1735
|
+
400: ApiError;
|
|
1736
|
+
/**
|
|
1737
|
+
* Forbidden
|
|
1738
|
+
*/
|
|
1739
|
+
403: ApiError;
|
|
1740
|
+
/**
|
|
1741
|
+
* Request Timeout
|
|
1742
|
+
*/
|
|
1743
|
+
408: ApiError;
|
|
1744
|
+
/**
|
|
1745
|
+
* Request Entity Too Large
|
|
1746
|
+
*/
|
|
1747
|
+
413: string;
|
|
1748
|
+
/**
|
|
1749
|
+
* Unsupported Media Type
|
|
1750
|
+
*/
|
|
1751
|
+
415: ApiError;
|
|
1752
|
+
/**
|
|
1753
|
+
* Unprocessable Entity
|
|
1754
|
+
*/
|
|
1755
|
+
422: ApiError;
|
|
1756
|
+
/**
|
|
1757
|
+
* Too Many Requests
|
|
1758
|
+
*/
|
|
1759
|
+
429: ApiError;
|
|
1760
|
+
/**
|
|
1761
|
+
* Internal Server Error
|
|
1762
|
+
*/
|
|
1763
|
+
500: ApiError;
|
|
1764
|
+
};
|
|
1765
|
+
type GenerateSimilarImagesV3AsyncError = GenerateSimilarImagesV3AsyncErrors[keyof GenerateSimilarImagesV3AsyncErrors];
|
|
1766
|
+
type GenerateSimilarImagesV3AsyncResponses = {
|
|
1767
|
+
/**
|
|
1768
|
+
* Accepted
|
|
1769
|
+
*/
|
|
1770
|
+
202: AsyncAcceptResponseV3;
|
|
1771
|
+
};
|
|
1772
|
+
type GenerateSimilarImagesV3AsyncResponse = GenerateSimilarImagesV3AsyncResponses[keyof GenerateSimilarImagesV3AsyncResponses];
|
|
1773
|
+
type ExpandImagesV3AsyncData = {
|
|
1774
|
+
body: ExpandImageRequestV3;
|
|
1775
|
+
path?: never;
|
|
1776
|
+
query?: never;
|
|
1777
|
+
url: '/v3/images/expand-async';
|
|
1778
|
+
};
|
|
1779
|
+
type ExpandImagesV3AsyncErrors = {
|
|
1780
|
+
/**
|
|
1781
|
+
* Bad Request
|
|
1782
|
+
*/
|
|
1783
|
+
400: ApiError;
|
|
1784
|
+
/**
|
|
1785
|
+
* Forbidden
|
|
1786
|
+
*/
|
|
1787
|
+
403: ApiError;
|
|
1788
|
+
/**
|
|
1789
|
+
* Request Timeout
|
|
1790
|
+
*/
|
|
1791
|
+
408: ApiError;
|
|
1792
|
+
/**
|
|
1793
|
+
* Request Entity Too Large
|
|
1794
|
+
*/
|
|
1795
|
+
413: string;
|
|
1796
|
+
/**
|
|
1797
|
+
* Unsupported Media Type
|
|
1798
|
+
*/
|
|
1799
|
+
415: ApiError;
|
|
1800
|
+
/**
|
|
1801
|
+
* Unprocessable Entity
|
|
1802
|
+
*/
|
|
1803
|
+
422: ApiError;
|
|
1804
|
+
/**
|
|
1805
|
+
* Too Many Requests
|
|
1806
|
+
*/
|
|
1807
|
+
429: ApiError;
|
|
1808
|
+
/**
|
|
1809
|
+
* Internal Server Error
|
|
1810
|
+
*/
|
|
1811
|
+
500: ApiError;
|
|
1812
|
+
};
|
|
1813
|
+
type ExpandImagesV3AsyncError = ExpandImagesV3AsyncErrors[keyof ExpandImagesV3AsyncErrors];
|
|
1814
|
+
type ExpandImagesV3AsyncResponses = {
|
|
1815
|
+
/**
|
|
1816
|
+
* Accepted
|
|
1817
|
+
*/
|
|
1818
|
+
202: AsyncAcceptResponseV3;
|
|
1819
|
+
};
|
|
1820
|
+
type ExpandImagesV3AsyncResponse = ExpandImagesV3AsyncResponses[keyof ExpandImagesV3AsyncResponses];
|
|
1821
|
+
type FillImagesV3AsyncData = {
|
|
1822
|
+
body: FillImageRequestV3;
|
|
1823
|
+
path?: never;
|
|
1824
|
+
query?: never;
|
|
1825
|
+
url: '/v3/images/fill-async';
|
|
1826
|
+
};
|
|
1827
|
+
type FillImagesV3AsyncErrors = {
|
|
1828
|
+
/**
|
|
1829
|
+
* Bad Request
|
|
1830
|
+
*/
|
|
1831
|
+
400: ApiError;
|
|
1832
|
+
/**
|
|
1833
|
+
* Forbidden
|
|
1834
|
+
*/
|
|
1835
|
+
403: ApiError;
|
|
1836
|
+
/**
|
|
1837
|
+
* Request Timeout
|
|
1838
|
+
*/
|
|
1839
|
+
408: ApiError;
|
|
1840
|
+
/**
|
|
1841
|
+
* Request Entity Too Large
|
|
1842
|
+
*/
|
|
1843
|
+
413: string;
|
|
1844
|
+
/**
|
|
1845
|
+
* Unsupported Media Type
|
|
1846
|
+
*/
|
|
1847
|
+
415: ApiError;
|
|
1848
|
+
/**
|
|
1849
|
+
* Unprocessable Entity
|
|
1850
|
+
*/
|
|
1851
|
+
422: ApiError;
|
|
1852
|
+
/**
|
|
1853
|
+
* Too Many Requests
|
|
1854
|
+
*/
|
|
1855
|
+
429: ApiError;
|
|
1856
|
+
/**
|
|
1857
|
+
* Internal Server Error
|
|
1858
|
+
*/
|
|
1859
|
+
500: ApiError;
|
|
1860
|
+
};
|
|
1861
|
+
type FillImagesV3AsyncError = FillImagesV3AsyncErrors[keyof FillImagesV3AsyncErrors];
|
|
1862
|
+
type FillImagesV3AsyncResponses = {
|
|
1863
|
+
/**
|
|
1864
|
+
* Accepted
|
|
1865
|
+
*/
|
|
1866
|
+
202: AsyncAcceptResponseV3;
|
|
1867
|
+
};
|
|
1868
|
+
type FillImagesV3AsyncResponse = FillImagesV3AsyncResponses[keyof FillImagesV3AsyncResponses];
|
|
1869
|
+
type GenerateObjectCompositeV3AsyncData = {
|
|
1870
|
+
body: GenerateObjectCompositeRequestV3;
|
|
1871
|
+
path?: never;
|
|
1872
|
+
query?: never;
|
|
1873
|
+
url: '/v3/images/generate-object-composite-async';
|
|
1874
|
+
};
|
|
1875
|
+
type GenerateObjectCompositeV3AsyncErrors = {
|
|
1876
|
+
/**
|
|
1877
|
+
* Bad Request
|
|
1878
|
+
*/
|
|
1879
|
+
400: ApiError;
|
|
1880
|
+
/**
|
|
1881
|
+
* Forbidden
|
|
1882
|
+
*/
|
|
1883
|
+
403: ApiError;
|
|
1884
|
+
/**
|
|
1885
|
+
* Request Timeout
|
|
1886
|
+
*/
|
|
1887
|
+
408: ApiError;
|
|
1888
|
+
/**
|
|
1889
|
+
* Unsupported Media Type
|
|
1890
|
+
*/
|
|
1891
|
+
415: ApiError;
|
|
1892
|
+
/**
|
|
1893
|
+
* Unprocessable Entity
|
|
1894
|
+
*/
|
|
1895
|
+
422: ApiError;
|
|
1896
|
+
/**
|
|
1897
|
+
* Too Many Requests
|
|
1898
|
+
*/
|
|
1899
|
+
429: ApiError;
|
|
1900
|
+
/**
|
|
1901
|
+
* Internal Server Error
|
|
1902
|
+
*/
|
|
1903
|
+
500: ApiError;
|
|
1904
|
+
};
|
|
1905
|
+
type GenerateObjectCompositeV3AsyncError = GenerateObjectCompositeV3AsyncErrors[keyof GenerateObjectCompositeV3AsyncErrors];
|
|
1906
|
+
type GenerateObjectCompositeV3AsyncResponses = {
|
|
1907
|
+
/**
|
|
1908
|
+
* Accepted
|
|
1909
|
+
*/
|
|
1910
|
+
202: AsyncAcceptResponseV3;
|
|
1911
|
+
};
|
|
1912
|
+
type GenerateObjectCompositeV3AsyncResponse = GenerateObjectCompositeV3AsyncResponses[keyof GenerateObjectCompositeV3AsyncResponses];
|
|
1913
|
+
type PreciseCompositeData = {
|
|
1914
|
+
body: PreciseCompositeRequest;
|
|
1915
|
+
headers: {
|
|
1916
|
+
/**
|
|
1917
|
+
* Must be application/json for JSON request body.
|
|
1918
|
+
*/
|
|
1919
|
+
'content-type': 'application/json';
|
|
1920
|
+
};
|
|
1921
|
+
path?: never;
|
|
1922
|
+
query?: never;
|
|
1923
|
+
url: '/v3/images/precise-composite';
|
|
1924
|
+
};
|
|
1925
|
+
type PreciseCompositeErrors = {
|
|
1926
|
+
/**
|
|
1927
|
+
* Bad Request
|
|
1928
|
+
*/
|
|
1929
|
+
400: ValidationErrorResponse;
|
|
1930
|
+
/**
|
|
1931
|
+
* Unauthorized
|
|
1932
|
+
*/
|
|
1933
|
+
401: ApiErrorGeneric;
|
|
1934
|
+
/**
|
|
1935
|
+
* Forbidden
|
|
1936
|
+
*/
|
|
1937
|
+
403: ApiErrorGeneric;
|
|
1938
|
+
/**
|
|
1939
|
+
* Too Many Requests
|
|
1940
|
+
*/
|
|
1941
|
+
429: ApiErrorGeneric;
|
|
1942
|
+
/**
|
|
1943
|
+
* Internal Server Error
|
|
1944
|
+
*/
|
|
1945
|
+
500: ApiErrorGeneric;
|
|
1946
|
+
/**
|
|
1947
|
+
* Service Unavailable
|
|
1948
|
+
*/
|
|
1949
|
+
503: ApiErrorGeneric;
|
|
1950
|
+
};
|
|
1951
|
+
type PreciseCompositeError = PreciseCompositeErrors[keyof PreciseCompositeErrors];
|
|
1952
|
+
type PreciseCompositeResponses = {
|
|
1953
|
+
/**
|
|
1954
|
+
* Accepted
|
|
1955
|
+
*/
|
|
1956
|
+
202: AsyncJobResponse;
|
|
1957
|
+
};
|
|
1958
|
+
type PreciseCompositeResponse = PreciseCompositeResponses[keyof PreciseCompositeResponses];
|
|
1959
|
+
type AdaptiveCompositeData = {
|
|
1960
|
+
body: AdaptiveCompositeRequest;
|
|
1961
|
+
headers: {
|
|
1962
|
+
/**
|
|
1963
|
+
* Must be application/json for JSON request body.
|
|
1964
|
+
*/
|
|
1965
|
+
'content-type': 'application/json';
|
|
1966
|
+
};
|
|
1967
|
+
path?: never;
|
|
1968
|
+
query?: never;
|
|
1969
|
+
url: '/v3/images/adaptive-composite';
|
|
1970
|
+
};
|
|
1971
|
+
type AdaptiveCompositeErrors = {
|
|
1972
|
+
/**
|
|
1973
|
+
* Bad Request
|
|
1974
|
+
*/
|
|
1975
|
+
400: ValidationErrorResponse;
|
|
1976
|
+
/**
|
|
1977
|
+
* Unauthorized
|
|
1978
|
+
*/
|
|
1979
|
+
401: ApiErrorGeneric;
|
|
1980
|
+
/**
|
|
1981
|
+
* Forbidden
|
|
1982
|
+
*/
|
|
1983
|
+
403: ApiErrorGeneric;
|
|
1984
|
+
/**
|
|
1985
|
+
* Too Many Requests
|
|
1986
|
+
*/
|
|
1987
|
+
429: ApiErrorGeneric;
|
|
1988
|
+
/**
|
|
1989
|
+
* Internal Server Error
|
|
1990
|
+
*/
|
|
1991
|
+
500: ApiErrorGeneric;
|
|
1992
|
+
/**
|
|
1993
|
+
* Service Unavailable
|
|
1994
|
+
*/
|
|
1995
|
+
503: ApiErrorGeneric;
|
|
1996
|
+
};
|
|
1997
|
+
type AdaptiveCompositeError = AdaptiveCompositeErrors[keyof AdaptiveCompositeErrors];
|
|
1998
|
+
type AdaptiveCompositeResponses = {
|
|
1999
|
+
/**
|
|
2000
|
+
* Accepted
|
|
2001
|
+
*/
|
|
2002
|
+
202: AsyncJobResponse;
|
|
2003
|
+
};
|
|
2004
|
+
type AdaptiveCompositeResponse = AdaptiveCompositeResponses[keyof AdaptiveCompositeResponses];
|
|
2005
|
+
type GenerateVideoV3Data = {
|
|
2006
|
+
/**
|
|
2007
|
+
* The request body for the video generation.
|
|
2008
|
+
*/
|
|
2009
|
+
body: GenerateVideoRequestV3;
|
|
2010
|
+
headers: {
|
|
2011
|
+
/**
|
|
2012
|
+
* Specify the Firefly model version to use for the video generation.
|
|
2013
|
+
*/
|
|
2014
|
+
'x-model-version': 'video1_standard';
|
|
2015
|
+
};
|
|
2016
|
+
path?: never;
|
|
2017
|
+
query?: never;
|
|
2018
|
+
url: '/v3/videos/generate';
|
|
2019
|
+
};
|
|
2020
|
+
type GenerateVideoV3Errors = {
|
|
2021
|
+
/**
|
|
2022
|
+
* Bad Request
|
|
2023
|
+
*/
|
|
2024
|
+
400: ApiError;
|
|
2025
|
+
/**
|
|
2026
|
+
* Forbidden
|
|
2027
|
+
*/
|
|
2028
|
+
403: ApiError;
|
|
2029
|
+
/**
|
|
2030
|
+
* Request Timeout
|
|
2031
|
+
*/
|
|
2032
|
+
408: ApiError;
|
|
2033
|
+
/**
|
|
2034
|
+
* Unsupported Media Type
|
|
2035
|
+
*/
|
|
2036
|
+
415: ApiError;
|
|
2037
|
+
/**
|
|
2038
|
+
* Unprocessable Entity
|
|
2039
|
+
*/
|
|
2040
|
+
422: ApiError;
|
|
2041
|
+
/**
|
|
2042
|
+
* Too Many Requests
|
|
2043
|
+
*/
|
|
2044
|
+
429: ApiError;
|
|
2045
|
+
/**
|
|
2046
|
+
* Internal Server Error
|
|
2047
|
+
*/
|
|
2048
|
+
500: ApiError;
|
|
2049
|
+
};
|
|
2050
|
+
type GenerateVideoV3Error = GenerateVideoV3Errors[keyof GenerateVideoV3Errors];
|
|
2051
|
+
type GenerateVideoV3Responses = {
|
|
2052
|
+
/**
|
|
2053
|
+
* Accepted
|
|
2054
|
+
*/
|
|
2055
|
+
202: AsyncAcceptResponseV3;
|
|
2056
|
+
};
|
|
2057
|
+
type GenerateVideoV3Response = GenerateVideoV3Responses[keyof GenerateVideoV3Responses];
|
|
2058
|
+
type GetCustomModelsData = {
|
|
2059
|
+
body?: never;
|
|
2060
|
+
headers: {
|
|
2061
|
+
/**
|
|
2062
|
+
* A user token referencing the user's individual account, obtained using their credentials. The user token must be preceded by `Bearer`.
|
|
2063
|
+
*/
|
|
2064
|
+
'x-user-token'?: string;
|
|
2065
|
+
/**
|
|
2066
|
+
* A unique request identifier defined by you. This is used by Adobe Support to trace the request in logs. This header is automatically generated by the server if not explicitly set.
|
|
2067
|
+
*/
|
|
2068
|
+
'x-request-id': string;
|
|
2069
|
+
};
|
|
2070
|
+
path?: never;
|
|
2071
|
+
query?: {
|
|
2072
|
+
/**
|
|
2073
|
+
* A sorting option for the response list. For a reverse sort, use `-` (e.g., `-modifiedDate`). Multi-vector sorting is not currently supported.
|
|
2074
|
+
*/
|
|
2075
|
+
sortBy?: 'assetName' | 'createdDate' | 'modifiedDate';
|
|
2076
|
+
/**
|
|
2077
|
+
* The first result to include in a paginated response. Required if a `limit` is specified.
|
|
2078
|
+
*/
|
|
2079
|
+
start?: string;
|
|
2080
|
+
/**
|
|
2081
|
+
* The number of custom models to return in a paginated response.
|
|
2082
|
+
*/
|
|
2083
|
+
limit?: string;
|
|
2084
|
+
/**
|
|
2085
|
+
* This filters custom models by published state.
|
|
2086
|
+
*/
|
|
2087
|
+
publishedState?: 'all' | 'ready' | 'published' | 'unpublished' | 'queued' | 'training' | 'failed' | 'cancelled';
|
|
2088
|
+
};
|
|
2089
|
+
url: '/v3/custom-models';
|
|
2090
|
+
};
|
|
2091
|
+
type GetCustomModelsErrors = {
|
|
2092
|
+
/**
|
|
2093
|
+
* Bad Request
|
|
2094
|
+
*/
|
|
2095
|
+
400: ErrorResponse;
|
|
2096
|
+
/**
|
|
2097
|
+
* Unauthorized
|
|
2098
|
+
*/
|
|
2099
|
+
401: ErrorResponse;
|
|
2100
|
+
/**
|
|
2101
|
+
* Forbidden
|
|
2102
|
+
*/
|
|
2103
|
+
403: ErrorResponse;
|
|
2104
|
+
/**
|
|
2105
|
+
* Not Acceptable
|
|
2106
|
+
*/
|
|
2107
|
+
406: ErrorResponse;
|
|
2108
|
+
/**
|
|
2109
|
+
* Internal Server Error
|
|
2110
|
+
*/
|
|
2111
|
+
500: ErrorResponse;
|
|
2112
|
+
/**
|
|
2113
|
+
* Service Unavailable
|
|
2114
|
+
*/
|
|
2115
|
+
503: ErrorResponse;
|
|
2116
|
+
};
|
|
2117
|
+
type GetCustomModelsError = GetCustomModelsErrors[keyof GetCustomModelsErrors];
|
|
2118
|
+
type GetCustomModelsResponses = {
|
|
2119
|
+
/**
|
|
2120
|
+
* Success
|
|
2121
|
+
*/
|
|
2122
|
+
200: CustomModelsFf3pInfo;
|
|
2123
|
+
};
|
|
2124
|
+
type GetCustomModelsResponse = GetCustomModelsResponses[keyof GetCustomModelsResponses];
|
|
2125
|
+
type StorageImageV2Data = {
|
|
2126
|
+
/**
|
|
2127
|
+
* The PNG/JPEG/WEBP image to be stored (binary data). The maximum file size supported for uploading an image is 15MB.
|
|
2128
|
+
*/
|
|
2129
|
+
body: Blob | File;
|
|
2130
|
+
path?: never;
|
|
2131
|
+
query?: never;
|
|
2132
|
+
url: '/v2/storage/image';
|
|
2133
|
+
};
|
|
2134
|
+
type StorageImageV2Errors = {
|
|
2135
|
+
/**
|
|
2136
|
+
* Bad Request
|
|
2137
|
+
*/
|
|
2138
|
+
400: ErrorBody;
|
|
2139
|
+
/**
|
|
2140
|
+
* Unauthorized
|
|
2141
|
+
*/
|
|
2142
|
+
401: ErrorBody;
|
|
2143
|
+
/**
|
|
2144
|
+
* Forbidden
|
|
2145
|
+
*/
|
|
2146
|
+
403: ErrorBody;
|
|
2147
|
+
/**
|
|
2148
|
+
* Too Many Requests
|
|
2149
|
+
*/
|
|
2150
|
+
429: ErrorBody;
|
|
2151
|
+
/**
|
|
2152
|
+
* Unavailable for Legal Reasons
|
|
2153
|
+
*/
|
|
2154
|
+
451: ErrorBody;
|
|
2155
|
+
/**
|
|
2156
|
+
* Internal Server Error
|
|
2157
|
+
*/
|
|
2158
|
+
500: ErrorBody;
|
|
2159
|
+
};
|
|
2160
|
+
type StorageImageV2Error = StorageImageV2Errors[keyof StorageImageV2Errors];
|
|
2161
|
+
type StorageImageV2Responses = {
|
|
2162
|
+
/**
|
|
2163
|
+
* Success
|
|
2164
|
+
*/
|
|
2165
|
+
200: StorageImageResponse;
|
|
2166
|
+
};
|
|
2167
|
+
type StorageImageV2Response = StorageImageV2Responses[keyof StorageImageV2Responses];
|
|
2168
|
+
type JobResultV3Data = {
|
|
2169
|
+
body?: never;
|
|
2170
|
+
path: {
|
|
2171
|
+
/**
|
|
2172
|
+
* Job ID
|
|
2173
|
+
*
|
|
2174
|
+
* The job ID to retrieve status for.
|
|
2175
|
+
*/
|
|
2176
|
+
jobId: string;
|
|
2177
|
+
};
|
|
2178
|
+
query?: never;
|
|
2179
|
+
url: '/v3/status/{jobId}';
|
|
2180
|
+
};
|
|
2181
|
+
type JobResultV3Errors = {
|
|
2182
|
+
/**
|
|
2183
|
+
* Unauthorized
|
|
2184
|
+
*/
|
|
2185
|
+
401: ApiErrorGeneric;
|
|
2186
|
+
/**
|
|
2187
|
+
* Forbidden
|
|
2188
|
+
*/
|
|
2189
|
+
403: ApiErrorGeneric;
|
|
2190
|
+
/**
|
|
2191
|
+
* Requested Resource Was Not Found
|
|
2192
|
+
*/
|
|
2193
|
+
404: ApiErrorGeneric;
|
|
2194
|
+
/**
|
|
2195
|
+
* Unprocessable Entity
|
|
2196
|
+
*/
|
|
2197
|
+
422: ApiErrorGeneric;
|
|
2198
|
+
/**
|
|
2199
|
+
* Too Many Requests
|
|
2200
|
+
*/
|
|
2201
|
+
429: ApiErrorGeneric;
|
|
2202
|
+
/**
|
|
2203
|
+
* Internal Server Error
|
|
2204
|
+
*/
|
|
2205
|
+
500: ApiErrorGeneric;
|
|
2206
|
+
/**
|
|
2207
|
+
* Service Unavailable
|
|
2208
|
+
*/
|
|
2209
|
+
503: ApiErrorGeneric;
|
|
2210
|
+
};
|
|
2211
|
+
type JobResultV3Error = JobResultV3Errors[keyof JobResultV3Errors];
|
|
2212
|
+
type JobResultV3Responses = {
|
|
2213
|
+
/**
|
|
2214
|
+
* Success
|
|
2215
|
+
*/
|
|
2216
|
+
200: JobResponse;
|
|
2217
|
+
};
|
|
2218
|
+
type JobResultV3Response = JobResultV3Responses[keyof JobResultV3Responses];
|
|
2219
|
+
type CancelJobV4Data = {
|
|
2220
|
+
body?: never;
|
|
2221
|
+
path: {
|
|
2222
|
+
/**
|
|
2223
|
+
* Job ID
|
|
2224
|
+
*
|
|
2225
|
+
* The job ID to cancel.
|
|
2226
|
+
*/
|
|
2227
|
+
jobId: string;
|
|
2228
|
+
};
|
|
2229
|
+
query?: never;
|
|
2230
|
+
url: '/v3/cancel/{jobId}';
|
|
2231
|
+
};
|
|
2232
|
+
type CancelJobV4Errors = {
|
|
2233
|
+
/**
|
|
2234
|
+
* Unauthorized
|
|
2235
|
+
*/
|
|
2236
|
+
401: ApiErrorGeneric;
|
|
2237
|
+
/**
|
|
2238
|
+
* Forbidden
|
|
2239
|
+
*/
|
|
2240
|
+
403: ApiErrorGeneric;
|
|
2241
|
+
/**
|
|
2242
|
+
* Requested Resource Was Not Found
|
|
2243
|
+
*/
|
|
2244
|
+
404: ApiErrorGeneric;
|
|
2245
|
+
/**
|
|
2246
|
+
* Conflict
|
|
2247
|
+
*/
|
|
2248
|
+
409: ApiErrorGeneric;
|
|
2249
|
+
/**
|
|
2250
|
+
* Gone
|
|
2251
|
+
*/
|
|
2252
|
+
410: ApiErrorGeneric;
|
|
2253
|
+
/**
|
|
2254
|
+
* Too Many Requests
|
|
2255
|
+
*/
|
|
2256
|
+
429: ApiErrorGeneric;
|
|
2257
|
+
/**
|
|
2258
|
+
* Internal Server Error
|
|
2259
|
+
*/
|
|
2260
|
+
500: ApiErrorGeneric;
|
|
2261
|
+
/**
|
|
2262
|
+
* Service Unavailable
|
|
2263
|
+
*/
|
|
2264
|
+
503: ApiErrorGeneric;
|
|
2265
|
+
};
|
|
2266
|
+
type CancelJobV4Error = CancelJobV4Errors[keyof CancelJobV4Errors];
|
|
2267
|
+
type CancelJobV4Responses = {
|
|
2268
|
+
/**
|
|
2269
|
+
* Job Cancelled
|
|
2270
|
+
*/
|
|
2271
|
+
200: unknown;
|
|
2272
|
+
};
|
|
2273
|
+
//#endregion
|
|
2274
|
+
//#region packages/firefly/src/sdk/sdk.gen.d.ts
|
|
2275
|
+
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
|
|
2276
|
+
/**
|
|
2277
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
2278
|
+
* individual options. This might be also useful if you want to implement a
|
|
2279
|
+
* custom client.
|
|
2280
|
+
*/
|
|
2281
|
+
client?: Client;
|
|
2282
|
+
/**
|
|
2283
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
2284
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
2285
|
+
*/
|
|
2286
|
+
meta?: Record<string, unknown>;
|
|
2287
|
+
};
|
|
2288
|
+
declare class HeyApiClient {
|
|
2289
|
+
protected client: Client;
|
|
2290
|
+
constructor(args?: {
|
|
2291
|
+
client?: Client;
|
|
2292
|
+
});
|
|
2293
|
+
}
|
|
2294
|
+
declare class HeyApiRegistry<T> {
|
|
2295
|
+
private readonly defaultKey;
|
|
2296
|
+
private readonly instances;
|
|
2297
|
+
get(key?: string): T;
|
|
2298
|
+
set(value: T, key?: string): void;
|
|
2299
|
+
}
|
|
2300
|
+
declare class FireflySdk extends HeyApiClient {
|
|
2301
|
+
static readonly __registry: HeyApiRegistry<FireflySdk>;
|
|
2302
|
+
constructor(args?: {
|
|
2303
|
+
client?: Client;
|
|
2304
|
+
key?: string;
|
|
2305
|
+
});
|
|
2306
|
+
/**
|
|
2307
|
+
* Generate images
|
|
2308
|
+
*
|
|
2309
|
+
* Generate images based on a text prompt. You may also include a reference image and Firefly will try to mimic the characteristics, such as color scheme, lighting, layout of objects in the image, etc.
|
|
2310
|
+
*/
|
|
2311
|
+
generateImagesV3Async<ThrowOnError extends boolean = false>(options: Options<GenerateImagesV3AsyncData, ThrowOnError>): RequestResult<GenerateImagesV3AsyncResponses, GenerateImagesV3AsyncErrors, ThrowOnError, "fields">;
|
|
2312
|
+
/**
|
|
2313
|
+
* Generate similar images
|
|
2314
|
+
*
|
|
2315
|
+
* Generate similar images based on a reference image that you provide as a parameter.
|
|
2316
|
+
*/
|
|
2317
|
+
generateSimilarImagesV3Async<ThrowOnError extends boolean = false>(options: Options<GenerateSimilarImagesV3AsyncData, ThrowOnError>): RequestResult<GenerateSimilarImagesV3AsyncResponses, GenerateSimilarImagesV3AsyncErrors, ThrowOnError, "fields">;
|
|
2318
|
+
/**
|
|
2319
|
+
* Expand image
|
|
2320
|
+
*
|
|
2321
|
+
* Change the aspect ratio or size of an image to expand it. Optionally, provide a text prompt to generate additional imagery for the expansion.
|
|
2322
|
+
*/
|
|
2323
|
+
expandImagesV3Async<ThrowOnError extends boolean = false>(options: Options<ExpandImagesV3AsyncData, ThrowOnError>): RequestResult<ExpandImagesV3AsyncResponses, ExpandImagesV3AsyncErrors, ThrowOnError, "fields">;
|
|
2324
|
+
/**
|
|
2325
|
+
* Fill image
|
|
2326
|
+
*
|
|
2327
|
+
* Generates a fill in an area of an image based on a text prompt. A mask defines the area of the image to be filled.
|
|
2328
|
+
*/
|
|
2329
|
+
fillImagesV3Async<ThrowOnError extends boolean = false>(options: Options<FillImagesV3AsyncData, ThrowOnError>): RequestResult<FillImagesV3AsyncResponses, FillImagesV3AsyncErrors, ThrowOnError, "fields">;
|
|
2330
|
+
/**
|
|
2331
|
+
* Generate object composite
|
|
2332
|
+
*
|
|
2333
|
+
* Combines your image and images generated by Firefly to create an image composite, or scene. The images that Firefly generates are based on a text prompt that you provide. You can upload an image with or without an image mask, such as a product photo, but for a successful result one of the following conditions must be true: <ul> <li>The request size is larger than the input image, OR</li> <li>The image contains a transparent layer/channel, OR</li> <li>A mask is provided</li> </ul>
|
|
2334
|
+
*/
|
|
2335
|
+
generateObjectCompositeV3Async<ThrowOnError extends boolean = false>(options: Options<GenerateObjectCompositeV3AsyncData, ThrowOnError>): RequestResult<GenerateObjectCompositeV3AsyncResponses, GenerateObjectCompositeV3AsyncErrors, ThrowOnError, "fields">;
|
|
2336
|
+
/**
|
|
2337
|
+
* Generate precise composite
|
|
2338
|
+
*
|
|
2339
|
+
* Submits an asynchronous precise composite generation job using the precise composite pipeline.
|
|
2340
|
+
*/
|
|
2341
|
+
preciseComposite<ThrowOnError extends boolean = false>(options: Options<PreciseCompositeData, ThrowOnError>): RequestResult<PreciseCompositeResponses, PreciseCompositeErrors, ThrowOnError, "fields">;
|
|
2342
|
+
/**
|
|
2343
|
+
* Generate adaptive composite
|
|
2344
|
+
*
|
|
2345
|
+
* Submits an asynchronous adaptive composite generation job using the adaptive composite pipeline.
|
|
2346
|
+
*/
|
|
2347
|
+
adaptiveComposite<ThrowOnError extends boolean = false>(options: Options<AdaptiveCompositeData, ThrowOnError>): RequestResult<AdaptiveCompositeResponses, AdaptiveCompositeErrors, ThrowOnError, "fields">;
|
|
2348
|
+
/**
|
|
2349
|
+
* Generate video
|
|
2350
|
+
*
|
|
2351
|
+
* Generate a five second video using a text prompt.
|
|
2352
|
+
*/
|
|
2353
|
+
generateVideoV3<ThrowOnError extends boolean = false>(options: Options<GenerateVideoV3Data, ThrowOnError>): RequestResult<GenerateVideoV3Responses, GenerateVideoV3Errors, ThrowOnError, "fields">;
|
|
2354
|
+
/**
|
|
2355
|
+
* Retrieve custom models
|
|
2356
|
+
*
|
|
2357
|
+
* Retrieve the custom models for a user.
|
|
2358
|
+
*/
|
|
2359
|
+
getCustomModels<ThrowOnError extends boolean = false>(options: Options<GetCustomModelsData, ThrowOnError>): RequestResult<GetCustomModelsResponses, GetCustomModelsErrors, ThrowOnError, "fields">;
|
|
2360
|
+
/**
|
|
2361
|
+
* Upload image
|
|
2362
|
+
*
|
|
2363
|
+
* Upload source image or mask for image-to-image operations, such as fill, expand. This API returns an identifier that is used to refer to uploaded content. The uploaded assets will be valid for 7 days from the date you upload them.
|
|
2364
|
+
*/
|
|
2365
|
+
storageImageV2<ThrowOnError extends boolean = false>(options: Options<StorageImageV2Data, ThrowOnError>): RequestResult<StorageImageV2Responses, StorageImageV2Errors, ThrowOnError, "fields">;
|
|
2366
|
+
/**
|
|
2367
|
+
* Get job status
|
|
2368
|
+
*
|
|
2369
|
+
* Get the status of an asynchronous job.
|
|
2370
|
+
*/
|
|
2371
|
+
jobResultV3<ThrowOnError extends boolean = false>(options: Options<JobResultV3Data, ThrowOnError>): RequestResult<JobResultV3Responses, JobResultV3Errors, ThrowOnError, "fields">;
|
|
2372
|
+
/**
|
|
2373
|
+
* Cancel job
|
|
2374
|
+
*
|
|
2375
|
+
* Cancel an asynchronous job.
|
|
2376
|
+
*/
|
|
2377
|
+
cancelJobV4<ThrowOnError extends boolean = false>(options: Options<CancelJobV4Data, ThrowOnError>): RequestResult<CancelJobV4Responses, CancelJobV4Errors, ThrowOnError, "fields">;
|
|
2378
|
+
}
|
|
2379
|
+
//#endregion
|
|
2380
|
+
export { type AdaptiveCompositeData, type AdaptiveCompositeError, type AdaptiveCompositeErrors, type AdaptiveCompositeRequest, type AdaptiveCompositeResponse, type AdaptiveCompositeResponses, type AdaptiveObjectInput, type AlignmentHorizontal, type AlignmentVertical, type ApiError, type ApiErrorGeneric, type AsyncAcceptResponseV3, type AsyncApiErrorV3, type AsyncJobResponse, type AsyncResponseV3, type AsyncResult, type AsyncTaskResponseV3, type BackgroundInput, type BaseInputImageV3, type BaseInputMaskV3, type BaseModel, type BodyExpandImagesV3Async, type BodyFillImagesV3Async, type BodyGenerateImagesV3Async, type BodyGenerateObjectCompositeV3Async, type BodyGenerateSimilarImagesV3Async, type CameraMotion, type CancelJobV4Data, type CancelJobV4Error, type CancelJobV4Errors, type CancelJobV4Responses, type ClientOptions, type ClinetoSize, type ColligoAsyncCancelErrorCodeV3, type ColligoErrorCodeAsyncV3, type ColliogAsyncStatusErrorCodeV3, type ContentClassV3, type CustomModelFf3pInfo, type CustomModelsFf3pInfo, type ErrorBody, type ErrorResponse, type ExpandImageRequestV3, type ExpandImageResponseV3, type ExpandImagesV3AsyncData, type ExpandImagesV3AsyncError, type ExpandImagesV3AsyncErrors, type ExpandImagesV3AsyncResponse, type ExpandImagesV3AsyncResponses, type FillImageRequestV3, type FillImageResponseV3, type FillImagesV3AsyncData, type FillImagesV3AsyncError, type FillImagesV3AsyncErrors, type FillImagesV3AsyncResponse, type FillImagesV3AsyncResponses, FireflySdk, type GenerateImagesRequestV3, type GenerateImagesResponseV3, type GenerateImagesV3AsyncData, type GenerateImagesV3AsyncError, type GenerateImagesV3AsyncErrors, type GenerateImagesV3AsyncResponse, type GenerateImagesV3AsyncResponses, type GenerateObjectCompositeRequestV3, type GenerateObjectCompositeResponseV3, type GenerateObjectCompositeV3AsyncData, type GenerateObjectCompositeV3AsyncError, type GenerateObjectCompositeV3AsyncErrors, type GenerateObjectCompositeV3AsyncResponse, type GenerateObjectCompositeV3AsyncResponses, type GenerateSimilarImagesRequestV3, type GenerateSimilarImagesResponseV3, type GenerateSimilarImagesV3AsyncData, type GenerateSimilarImagesV3AsyncError, type GenerateSimilarImagesV3AsyncErrors, type GenerateSimilarImagesV3AsyncResponse, type GenerateSimilarImagesV3AsyncResponses, type GenerateVideoRequestV3, type GenerateVideoV3Data, type GenerateVideoV3Error, type GenerateVideoV3Errors, type GenerateVideoV3Response, type GenerateVideoV3Responses, type GetCustomModelsData, type GetCustomModelsError, type GetCustomModelsErrors, type GetCustomModelsResponse, type GetCustomModelsResponses, type HttpValidationError, type ImageConditionV3, type ImageRef, type ImageSource, type InputImageV3, type InputImageVideoV3, type InputMaskV3, type JobOutput, type JobPollPayload, type JobResponse, type JobResult, type JobResultV3Data, type JobResultV3Error, type JobResultV3Errors, type JobResultV3Response, type JobResultV3Responses, type JobSucceededPayload, type Link, type Links, type ObjectInput, type Options, type OutputImageV3, type OutputSpec, type PageSpec, type Placement, type PlacementAlignment, type PlacementInset, type PlacementStart, type PreciseCompositeData, type PreciseCompositeError, type PreciseCompositeErrors, type PreciseCompositeRequest, type PreciseCompositeResponse, type PreciseCompositeResponses, type PublicBinaryInputV3, type PublicBinaryOutput, type PublicBinaryOutputV3, type ShotAngle, type ShotSize, type Size, type StorageImage, type StorageImageResponse, type StorageImageV2Data, type StorageImageV2Error, type StorageImageV2Errors, type StorageImageV2Response, type StorageImageV2Responses, type StructureImageReferenceV3, type StructureReferenceV3, type StylesImageReferenceV3, type StylesV3, type ValidationError, type ValidationErrorDetail, type ValidationErrorMessage, type ValidationErrorResponse, type VideoOutput, type VideoPromptStyle, type VideoResult, type VideoSettingsV3 };
|
|
2381
|
+
//# sourceMappingURL=sdk.d.cts.map
|