replicate-api
Version:
A typed client library for the replicate.com API
31 lines (30 loc) • 896 B
TypeScript
import { ReplicateRequestOptions } from "./helpers/makeApiRequest";
import { ModelNameOptions } from "./predict";
export type ResolveModelOptions = ModelNameOptions & ReplicateRequestOptions;
export type ModelVersionResponse = {
id: string;
created_at: string;
cog_version: string;
openapi_schema: unknown;
};
/** Get information about a model
* ```typescript
* const model = await getModel({
* model: "stability-ai/stable-diffusion",
* token: "Get your token at https://replicate.com/account"
* })
*
* const version = model.version
* ```
*/
export declare const getModel: (options: ResolveModelOptions) => Promise<{
url: string;
owner: string;
name: string;
description: string | undefined;
visibility: "public" | "private";
github: string | undefined;
paper: string | undefined;
license: string | undefined;
version: string;
}>;