Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import Replicate from "replicate";
const replicate = new Replicate({
// get your token from https://replicate.com/account
auth: process.env.REPLICATE_API_TOKEN,
userAgent: "my-app/1.2.3",
});
```

Expand Down Expand Up @@ -71,11 +70,11 @@ prediction = await replicate.wait(prediction);
const replicate = new Replicate(options);
```

| name | type | description |
| ------------------- | ------ | ---------------------------------------- |
| `options.auth` | string | **Required**. API access token |
| `options.userAgent` | string | **Required**. Identifier of your app |
| `options.baseUrl` | string | Defaults to https://api.replicate.com/v1 |
| name | type | description |
| ------------------- | ------ | --------------------------------------------------------------------------------- |
| `options.auth` | string | **Required**. API access token |
| `options.userAgent` | string | Identifier of your app. Defaults to `replicate-javascript/${packageJSON.version}` |
| `options.baseUrl` | string | Defaults to https://api.replicate.com/v1 |

### `replicate.models.get`

Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type Identifier = `${string}/${string}:${string}`;
declare module "replicate" {
export interface ReplicateOptions {
auth: string;
userAgent: string;
userAgent?: string;
baseUrl?: string;
}

Expand Down