Open History to see the last commit
1---
2id: PersistedArtifactRef
3title: PersistedArtifactRef
4---
5
6Defined in: packages/ai/src/types.ts:2406
7
8## Properties
9
10### artifactId
11
12```ts
13artifactId: string;
14```
15
16Defined in: packages/ai/src/types.ts:2408
17
18***
19
20### createdAt
21
22```ts
23createdAt: string;
24```
25
26Defined in: packages/ai/src/types.ts:2414
27
28***
29
30### mimeType
31
32```ts
33mimeType: string;
34```
35
36Defined in: packages/ai/src/types.ts:2412
37
38***
39
40### name
41
42```ts
43name: string;
44```
45
46Defined in: packages/ai/src/types.ts:2411
47
48***
49
50### role
51
52```ts
53role: PersistedArtifactRole;
54```
55
56Defined in: packages/ai/src/types.ts:2407
57
58***
59
60### runId
61
62```ts
63runId: string;
64```
65
66Defined in: packages/ai/src/types.ts:2410
67
68***
69
70### size
71
72```ts
73size: number;
74```
75
76Defined in: packages/ai/src/types.ts:2413
77
78***
79
80### source
81
82```ts
83source: object;
84```
85
86Defined in: packages/ai/src/types.ts:2430
87
88#### activity
89
90```ts
91activity: PersistedArtifactActivity;
92```
93
94#### expiresAt?
95
96```ts
97optional expiresAt?: string;
98```
99
100#### jobId?
101
102```ts
103optional jobId?: string;
104```
105
106#### mediaType?
107
108```ts
109optional mediaType?: "json" | "image" | "audio" | "video" | "document";
110```
111
112#### model
113
114```ts
115model: string;
116```
117
118#### path
119
120```ts
121path: string;
122```
123
124#### provider
125
126```ts
127provider: string;
128```
129
130***
131
132### sourceUrl?
133
134```ts
135optional sourceUrl?: string;
136```
137
138Defined in: packages/ai/src/types.ts:2421
139
140Where these bytes were fetched FROM — the provider's original result URL,
141or a caller-supplied prompt URL when `allowInputUrl` opted that in. Usually
142expiring, and provenance only: serve from [PersistedArtifactRef.url](#url)
143instead.
144
145***
146
147### threadId
148
149```ts
150threadId: string;
151```
152
153Defined in: packages/ai/src/types.ts:2409
154
155***
156
157### url?
158
159```ts
160optional url?: string;
161```
162
163Defined in: packages/ai/src/types.ts:2429
164
165Durable app-origin URL that serves this artifact's persisted bytes (your
166`GET` route around `retrieveArtifact` / `retrieveBlob`). Stamped by
167`withGenerationPersistence`'s `artifactUrl` option, so clients render and
168restore durable media from your own origin rather than the provider's
169expiring link.