@meterapp/car-image-sdk 1.44.0 → 1.46.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/README.md +25 -5
- package/dist/client.d.ts +32 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +156 -32
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +75 -18
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +117 -32
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/support.d.ts +5 -0
- package/dist/mcp/support.d.ts.map +1 -1
- package/dist/mcp/support.js +5 -5
- package/dist/mcp/support.js.map +1 -1
- package/dist/params.d.ts +15 -1
- package/dist/params.d.ts.map +1 -1
- package/dist/params.js +50 -1
- package/dist/params.js.map +1 -1
- package/dist/support.d.ts +5 -5
- package/dist/support.d.ts.map +1 -1
- package/dist/types.d.ts +212 -12
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +23 -3
- package/dist/types.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +18 -3
package/dist/mcp/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { checkoutLinkToolSchema, checkoutStatusResultSchema, checkoutStatusSchem
|
|
|
12
12
|
*/
|
|
13
13
|
import * as z from "zod";
|
|
14
14
|
import { isColor } from "../params.js";
|
|
15
|
-
import { CATALOG, CHECK_STATUSES, COLORS, CREDITS_PER_3D_MODEL, CREDITS_PER_DOLLAR, CREDITS_PER_IMAGE, DEFAULT_BASE_URL, FITS, FORMATS, FRAMINGS, FREE_CREDITS, FREE_COURTESY_VEHICLE_IMAGES, FREE_VEHICLE_IMAGES, PLAN_ALLOWANCES, IDEMPOTENCY_KEY_PATTERN, MAX_CHECK_VEHICLES, MAX_CHECK_VIEWS_VEHICLES, ASPECT_RATIOS, RESOLUTIONS, MAX_PADDING_PERCENT, MIN_YEAR, MODEL_3D_FILE_KINDS, REFERRAL_SOURCES, REQUEST_FORMATS, REQUEST_KINDS, REQUEST_SORTS, REQUEST_STATUSES, SIZES, MARKET_PATTERN, VEHICLE_ID_PATTERN, VIEWS, } from "../types.js";
|
|
15
|
+
import { CATALOG, CHECK_STATUSES, COLORS, CREDITS_PER_3D_MODEL, CREDITS_PER_DOLLAR, CREDITS_PER_IMAGE, DEFAULT_BASE_URL, FITS, FORMATS, FRAMINGS, FREE_CREDITS, FREE_COURTESY_VEHICLE_IMAGES, FREE_VEHICLE_IMAGES, PLAN_ALLOWANCES, IDEMPOTENCY_KEY_PATTERN, MAX_CHECK_VEHICLES, MAX_CHECK_VIEWS_VEHICLES, ASPECT_RATIOS, RESOLUTIONS, MAX_CAMPAIGN_LENGTH, MAX_PADDING_PERCENT, MAX_PIECES, MIN_YEAR, MODEL_3D_FILE_KINDS, REFERRAL_SOURCES, REQUEST_FORMATS, REQUEST_KINDS, REQUEST_SORTS, REQUEST_STATUSES, SIZES, MARKET_PATTERN, VEHICLE_ID_PATTERN, VIEWS, IMAGE_REPORT_CATEGORIES, IMAGE_REPORT_EXTERNAL_REF_MAX_LENGTH, IMAGE_REPORT_REASON_MAX_LENGTH, IMAGE_REPORT_STATUSES, IMAGE_REPORT_TYPES, } from "../types.js";
|
|
16
16
|
import { SDK_VERSION } from "../version.js";
|
|
17
17
|
/** The 3D price as agents read it: "100 credits ($1.00)". */
|
|
18
18
|
const RESOLUTION_NAMES = Object.keys(RESOLUTIONS);
|
|
@@ -87,6 +87,7 @@ export const MCP_TOOLSETS = {
|
|
|
87
87
|
"report_issue",
|
|
88
88
|
"upvote_feedback",
|
|
89
89
|
"submit_review",
|
|
90
|
+
"report_image",
|
|
90
91
|
"list_feedback",
|
|
91
92
|
"get_feedback",
|
|
92
93
|
"list_my_feedback",
|
|
@@ -108,7 +109,6 @@ export const MCP_TOOLSETS = {
|
|
|
108
109
|
"checkout_status",
|
|
109
110
|
"list_members",
|
|
110
111
|
"list_webhooks",
|
|
111
|
-
"rate_image",
|
|
112
112
|
"list_requests",
|
|
113
113
|
"request_vehicle",
|
|
114
114
|
"get_request",
|
|
@@ -120,15 +120,13 @@ export const MCP_TOOLSETS = {
|
|
|
120
120
|
};
|
|
121
121
|
/**
|
|
122
122
|
* Served on `all`, absent from the public reference since the 2026-09-30
|
|
123
|
-
* audit:
|
|
124
|
-
* request-board tools (the canonical feedback tools replace them; they keep
|
|
123
|
+
* audit: the original request-board tools (the canonical feedback tools replace them; they keep
|
|
125
124
|
* working) and the two "about you" tools. The docs, both READMEs, the OpenAPI
|
|
126
125
|
* description and the plugin skills never name them
|
|
127
126
|
* (app/_lib/client-surface-contract.test.ts), and what the reference says
|
|
128
127
|
* `?toolset=all` adds is {@link MCP_DOCUMENTED_EXTRAS}.
|
|
129
128
|
*/
|
|
130
129
|
export const MCP_UNLISTED_TOOLS = [
|
|
131
|
-
"rate_image",
|
|
132
130
|
"list_requests",
|
|
133
131
|
"request_vehicle",
|
|
134
132
|
"get_request",
|
|
@@ -259,6 +257,24 @@ const checkEntrySchema = z.object({
|
|
|
259
257
|
ref: z.coerce.string().max(200).optional().describe("Your id for the entry (a row, a SKU), echoed back with its answer."),
|
|
260
258
|
market: z.string().max(80).optional().describe("This entry's own market of sale (a two-letter country code), when it differs from the list's market. Any other value is ignored."),
|
|
261
259
|
});
|
|
260
|
+
/**
|
|
261
|
+
* Campaign tracking labels (`campaign`, `pieces`): notes recorded beside an
|
|
262
|
+
* image request or a URL mint, never part of the image, its URL or its charge.
|
|
263
|
+
* One type each, read the way the server reads them.
|
|
264
|
+
*/
|
|
265
|
+
export const campaignSchema = z
|
|
266
|
+
.string()
|
|
267
|
+
.trim()
|
|
268
|
+
.min(1)
|
|
269
|
+
.max(MAX_CAMPAIGN_LENGTH)
|
|
270
|
+
.regex(/^[^\u0000-\u001f\u007f-\u009f\u2028\u2029]*$/, "Use one line of text, without tabs or line breaks.")
|
|
271
|
+
.describe(`Campaign tracking, optional: the campaign or send this image is for, one line of at most ${MAX_CAMPAIGN_LENGTH} characters (e.g. "Spring mailer 2026"), recorded for the account's campaign reports. Never changes the image or the charge. Only when the human names a campaign; not utm_campaign.`);
|
|
272
|
+
export const piecesSchema = z.coerce
|
|
273
|
+
.number()
|
|
274
|
+
.int()
|
|
275
|
+
.min(1)
|
|
276
|
+
.max(MAX_PIECES)
|
|
277
|
+
.describe(`Campaign tracking, optional: how many pieces (emails, mail pieces, impressions) this image or URL will appear in, a good-faith whole number from 1 to ${MAX_PIECES.toLocaleString("en-US")}. Recorded for campaign reports and per-piece invoicing; never changes the image or the charge. Only when the human gives a count.`);
|
|
262
278
|
export const imageInputSchema = z
|
|
263
279
|
.object({
|
|
264
280
|
...vehicleFields,
|
|
@@ -311,6 +327,8 @@ export const imageInputSchema = z
|
|
|
311
327
|
.default("png")
|
|
312
328
|
.describe("png keeps the transparent background (default); webp is smallest; jpg is flattened onto white; auto lets each viewer's Accept header choose webp or png, negotiated on every load of a signed URL. An inline image (get_car_image) is delivered as png for auto."),
|
|
313
329
|
market: marketSchema.optional(),
|
|
330
|
+
campaign: campaignSchema.optional(),
|
|
331
|
+
pieces: piecesSchema.optional(),
|
|
314
332
|
})
|
|
315
333
|
.refine(namesOneVehicle, ONE_VEHICLE);
|
|
316
334
|
/** Logos share image transforms, but never vehicle selectors, views or paint. */
|
|
@@ -344,7 +362,7 @@ export const MCP_TOOL_SCHEMAS = {
|
|
|
344
362
|
.array(imageInputSchema)
|
|
345
363
|
.min(1)
|
|
346
364
|
.max(50)
|
|
347
|
-
.describe("One to fifty image requests. Each URL counts its vehicle image (vehicle, color, angle) for the month when created; the same image again this month adds nothing."),
|
|
365
|
+
.describe("One to fifty image requests. Each URL counts its vehicle image (vehicle, color, angle) for the month when created; the same image again this month adds nothing. An image's own campaign and pieces override the batch's."),
|
|
348
366
|
ttl_seconds: z.coerce
|
|
349
367
|
.number()
|
|
350
368
|
.int()
|
|
@@ -371,6 +389,8 @@ export const MCP_TOOL_SCHEMAS = {
|
|
|
371
389
|
.optional()
|
|
372
390
|
.describe("How long a renewable URL keeps renewing, 1 to 365 days from creation (default 365). Only with renew: true."),
|
|
373
391
|
market: marketSchema.optional().describe("Market of sale for every image that names none of its own: a two-letter country code such as AU. Only when the human named a market; otherwise omit (the account's default applies, if set)."),
|
|
392
|
+
campaign: campaignSchema.optional().describe(`Campaign tracking, optional: the campaign label for every image that names none of its own, one line of at most ${MAX_CAMPAIGN_LENGTH} characters. Recorded for campaign reports; never changes an image or the charge. Only when the human names a campaign.`),
|
|
393
|
+
pieces: piecesSchema.optional().describe(`Campaign tracking, optional: the piece count for every image that names none of its own: how many pieces (emails, mail pieces, impressions) each such URL will appear in, 1 to ${MAX_PIECES.toLocaleString("en-US")}. Set pieces on each image when the counts differ.`),
|
|
374
394
|
idempotency_key: z
|
|
375
395
|
.string()
|
|
376
396
|
.regex(IDEMPOTENCY_KEY_PATTERN, 'Use 1-255 characters of letters, digits, ".", "_", ":" or "-".')
|
|
@@ -416,22 +436,38 @@ export const MCP_TOOL_SCHEMAS = {
|
|
|
416
436
|
get_account: z.object({}),
|
|
417
437
|
list_members: z.object({}),
|
|
418
438
|
list_webhooks: z.object({}),
|
|
419
|
-
|
|
439
|
+
report_image: z.strictObject({
|
|
440
|
+
type: z
|
|
441
|
+
.enum(IMAGE_REPORT_TYPES)
|
|
442
|
+
.optional()
|
|
443
|
+
.describe("wrong_image: the wrong car, angle or paint. poor_quality: the right car, badly drawn. missing_vehicle: the catalog lacks the vehicle (make, model and year only, no image). Default: poor_quality for category quality, else wrong_image."),
|
|
444
|
+
category: z
|
|
445
|
+
.enum(IMAGE_REPORT_CATEGORIES)
|
|
446
|
+
.optional()
|
|
447
|
+
.describe("What is wrong with the image: identity (the wrong vehicle or generation, the default), camera (the wrong angle) or paint for wrong_image; quality for poor_quality. Omit for missing_vehicle."),
|
|
448
|
+
asset_id: z.string().uuid().optional().describe("The image asset id, when a response returned one."),
|
|
420
449
|
request_id: z
|
|
421
450
|
.string()
|
|
422
451
|
.min(1)
|
|
423
452
|
.max(128)
|
|
424
453
|
.optional()
|
|
425
|
-
.describe("The request_id returned by get_car_image or create_car_image_urls
|
|
454
|
+
.describe("The request_id returned with the image by get_car_image or create_car_image_urls. With asset_id, the preferred way to name the image."),
|
|
426
455
|
vehicle: vehicleIdSchema.optional(),
|
|
427
|
-
make: z.string().min(1).max(80).optional().describe("
|
|
428
|
-
model: z.string().min(1).max(80).optional(),
|
|
429
|
-
year: z.coerce.number().int().min(
|
|
430
|
-
view: z.enum(VIEWS).optional(),
|
|
456
|
+
make: z.string().min(1).max(80).optional().describe("Otherwise name the image by vehicle (a vehicle id, or make, model and year, with view and color). For missing_vehicle: the make as the human gave it."),
|
|
457
|
+
model: z.string().min(1).max(80).optional().describe("With make: the model. For missing_vehicle, as the human gave it."),
|
|
458
|
+
year: z.coerce.number().int().min(1900).max(2100).optional().describe("With make and model: the model year. Required for missing_vehicle."),
|
|
459
|
+
view: z.enum(VIEWS).optional().describe("With a vehicle: the view of the image."),
|
|
431
460
|
color: colorSchema.optional(),
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
461
|
+
reason: z
|
|
462
|
+
.string()
|
|
463
|
+
.max(IMAGE_REPORT_REASON_MAX_LENGTH)
|
|
464
|
+
.optional()
|
|
465
|
+
.describe("What is wrong, in a line, e.g. 'shows the previous generation'. No personal data."),
|
|
466
|
+
external_ref: z
|
|
467
|
+
.string()
|
|
468
|
+
.max(IMAGE_REPORT_EXTERNAL_REF_MAX_LENGTH)
|
|
469
|
+
.optional()
|
|
470
|
+
.describe("The human's own id for the report, such as a ticket in their app; returned on the report and in its webhooks. No personal data."),
|
|
435
471
|
}),
|
|
436
472
|
get_pricing: z.object({}),
|
|
437
473
|
search_help: helpQuerySchema,
|
|
@@ -966,6 +1002,9 @@ export const MCP_TOOL_OUTPUT_SCHEMAS = {
|
|
|
966
1002
|
etag: z.string().nullable(),
|
|
967
1003
|
request_id: z.string().nullable(),
|
|
968
1004
|
vehicle: vehicleDescriptorSchema,
|
|
1005
|
+
/** Campaign tracking: what was recorded, when the call named it. */
|
|
1006
|
+
campaign: z.string().optional(),
|
|
1007
|
+
pieces: z.number().int().optional(),
|
|
969
1008
|
}),
|
|
970
1009
|
create_car_image_urls: z.looseObject({
|
|
971
1010
|
data: z.array(z.looseObject({
|
|
@@ -980,6 +1019,9 @@ export const MCP_TOOL_OUTPUT_SCHEMAS = {
|
|
|
980
1019
|
/** Auto-renewing URLs keep serving, renewing in each opened window, until this instant. */
|
|
981
1020
|
renews_until: z.string().nullable().optional(),
|
|
982
1021
|
vehicle: vehicleDescriptorSchema,
|
|
1022
|
+
/** This URL's campaign tracking labels (its own, else the batch's), when it has any. */
|
|
1023
|
+
campaign: z.string().optional(),
|
|
1024
|
+
pieces: z.number().int().optional(),
|
|
983
1025
|
})),
|
|
984
1026
|
billing: z.looseObject({
|
|
985
1027
|
charged_on: z.literal("creation"),
|
|
@@ -990,6 +1032,9 @@ export const MCP_TOOL_OUTPUT_SCHEMAS = {
|
|
|
990
1032
|
vehicle_images: meterCountSchema.optional(),
|
|
991
1033
|
renewal: z.looseObject({ window_seconds: z.number(), credits_per_window: z.number().optional(), until: z.string() }).nullable().optional(),
|
|
992
1034
|
}),
|
|
1035
|
+
/** The campaign every URL shares, when they share one, and the sum of the URLs' pieces, when any has a count. */
|
|
1036
|
+
campaign: z.string().optional(),
|
|
1037
|
+
pieces: z.number().int().optional(),
|
|
993
1038
|
request_id: z.string(),
|
|
994
1039
|
/** True when a retry was answered from the result stored for its idempotency_key; nothing was billed again. */
|
|
995
1040
|
idempotent_replayed: z.boolean().optional(),
|
|
@@ -1168,14 +1213,24 @@ export const MCP_TOOL_OUTPUT_SCHEMAS = {
|
|
|
1168
1213
|
entitlement: z.looseObject({ plan: z.string(), receives: z.unknown() }).optional(),
|
|
1169
1214
|
request_id: z.string().optional(),
|
|
1170
1215
|
}),
|
|
1171
|
-
|
|
1216
|
+
report_image: z.looseObject({
|
|
1172
1217
|
data: z.looseObject({
|
|
1173
|
-
|
|
1174
|
-
|
|
1218
|
+
object: z.literal("image_report"),
|
|
1219
|
+
id: z.string(),
|
|
1220
|
+
/** The report's page, private to the reporting account and the Car Image team. */
|
|
1221
|
+
url: z.string(),
|
|
1222
|
+
type: z.enum(IMAGE_REPORT_TYPES),
|
|
1223
|
+
status: z.enum(IMAGE_REPORT_STATUSES),
|
|
1175
1224
|
flagged: z.boolean(),
|
|
1176
|
-
|
|
1177
|
-
|
|
1225
|
+
category: z.enum(IMAGE_REPORT_CATEGORIES).nullable(),
|
|
1226
|
+
asset_id: z.string().nullable(),
|
|
1227
|
+
vehicle: z.looseObject({ make: z.string(), model: z.string(), year: z.number() }),
|
|
1228
|
+
external_ref: z.string().nullable().optional(),
|
|
1229
|
+
report_count: z.number(),
|
|
1230
|
+
created_at: z.string(),
|
|
1178
1231
|
}),
|
|
1232
|
+
/** False when the report folded into the account's open one on the same image (or vehicle). */
|
|
1233
|
+
created: z.boolean().optional(),
|
|
1179
1234
|
request_id: z.string(),
|
|
1180
1235
|
}),
|
|
1181
1236
|
decode_vin: z.looseObject({ data: vinResultSchema, request_id: z.string() }),
|
|
@@ -1523,7 +1578,7 @@ export const MCP_TOOLS = {
|
|
|
1523
1578
|
get_car_image: {
|
|
1524
1579
|
name: "get_car_image",
|
|
1525
1580
|
title: "Get car image bytes",
|
|
1526
|
-
description: `In ChatGPT, use create_car_image_urls for the inline image card instead. In other hosts, show a vehicle in chat: returns the image as an MCP image the host displays inline with the result, and the bytes for a file. Name the vehicle, view and color in the reply; do not also mint a signed URL for the same image. Where the person cannot see tool images (a terminal), use create_car_image_urls instead. Counts one vehicle image (vehicle, color, angle) for the month on the account's plan, prepared yet or not; the same image again this month adds nothing. Legacy credit-meter accounts: COSTS ${CREDITS_PER_IMAGE} CREDIT per call, cached or generated. Call resolve_vehicle first (or search_vehicles, or decode_vin for a VIN) and pass the id it returns as \`vehicle\`: the lookup is free, and the catalog files cars under its own names (a Mazda "MX-5 Miata" is mx-5), so a make and model typed from memory can answer 404 for a car the catalog carries. Make, model and year are for callers that already hold catalog spellings. Nine camera angles, any paint color (fifteen named presets or any hex such as #1a2b3c), any width and height up to the stored image's own size, ${STORED_SIZE_NOTE} (fit contain|cover|inside), transparent or on a solid background, optionally trimmed to the car and with a soft ground shadow (shadow: true). Returns the image (PNG/WebP/JPG; format auto delivers PNG here) plus usage metadata (credits_charged, vehicle_images used this month, or credits_remaining on the credit meter; source cache|generated, request_id, the vehicle with its vehicle_id). Use create_car_image_urls for web pages, apps, emails and documents, and in a terminal. Do not call both paid tools for one image.`,
|
|
1581
|
+
description: `In ChatGPT, use create_car_image_urls for the inline image card instead. In other hosts, show a vehicle in chat: returns the image as an MCP image the host displays inline with the result, and the bytes for a file. Name the vehicle, view and color in the reply; do not also mint a signed URL for the same image. Where the person cannot see tool images (a terminal), use create_car_image_urls instead. Counts one vehicle image (vehicle, color, angle) for the month on the account's plan, prepared yet or not; the same image again this month adds nothing. Legacy credit-meter accounts: COSTS ${CREDITS_PER_IMAGE} CREDIT per call, cached or generated. Call resolve_vehicle first (or search_vehicles, or decode_vin for a VIN) and pass the id it returns as \`vehicle\`: the lookup is free, and the catalog files cars under its own names (a Mazda "MX-5 Miata" is mx-5), so a make and model typed from memory can answer 404 for a car the catalog carries. Make, model and year are for callers that already hold catalog spellings. Nine camera angles, any paint color (fifteen named presets or any hex such as #1a2b3c), any width and height up to the stored image's own size, ${STORED_SIZE_NOTE} (fit contain|cover|inside), transparent or on a solid background, optionally trimmed to the car and with a soft ground shadow (shadow: true). Returns the image (PNG/WebP/JPG; format auto delivers PNG here) plus usage metadata (credits_charged, vehicle_images used this month, or credits_remaining on the credit meter; source cache|generated, request_id, the vehicle with its vehicle_id, verified_on: the UTC day these exact bytes were compared with the manufacturer's material for that model year and matched (verified), or null when not checked, which does not mean wrong). Use create_car_image_urls for web pages, apps, emails and documents, and in a terminal. Do not call both paid tools for one image. Optional campaign and pieces tag the call for campaign reports.`,
|
|
1527
1582
|
inputSchema: MCP_TOOL_SCHEMAS.get_car_image,
|
|
1528
1583
|
outputSchema: MCP_TOOL_OUTPUT_SCHEMAS.get_car_image,
|
|
1529
1584
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
@@ -1531,7 +1586,7 @@ export const MCP_TOOLS = {
|
|
|
1531
1586
|
create_car_image_urls: {
|
|
1532
1587
|
name: "create_car_image_urls",
|
|
1533
1588
|
title: "Create signed car image URLs",
|
|
1534
|
-
description: "Put vehicle images into web pages, apps, emails and documents: create 1-50 key-free signed URLs a browser loads directly (<img src>), each with ready-to-display Markdown. In ChatGPT, use this tool to show the inline image card. In other chat hosts, get_car_image displays the picture inline. For chat use ttl_seconds 604800, max_uses 0 and renewal off unless requested. When ChatGPT shows the card, do not repeat its images or URLs. Without a card, use the returned Markdown where supported or link the same URL. Reuse unexpired URLs; never mint twice for one image. Each URL counts its vehicle image for the month at creation (1 credit on the legacy credit meter); loads within the TTL add nothing and are publicly cacheable. Each image names its vehicle like get_car_image: look each distinct vehicle up once (resolve_vehicle, search_vehicles or decode_vin, all free) and pass its id as vehicle, or send make, model and year in catalog spelling. Each takes any paint color (a preset or a hex) and the same sizing options (width, height, fit, background, framing, trim, padding, shadow); format auto makes the URL serve webp or png per viewer. For email, CMS pages or documents that outlive a TTL, set renew: true with ttl_seconds 604800: the URL keeps serving past expiry, renewing in each opened week (one more credit per week on the legacy credit meter), for up to renew_days. Pass idempotency_key when the call might be repeated: a retry with the same key and arguments replays the first result instead of billing again. Returns id, url, markdown, expires_at, max_uses, renews_until and the normalized vehicle for each image. Prefer this over get_car_image for HTML, Markdown files, documents, emails and websites. State expiry briefly.",
|
|
1589
|
+
description: "Put vehicle images into web pages, apps, emails and documents: create 1-50 key-free signed URLs a browser loads directly (<img src>), each with ready-to-display Markdown. In ChatGPT, use this tool to show the inline image card. In other chat hosts, get_car_image displays the picture inline. For chat use ttl_seconds 604800, max_uses 0 and renewal off unless requested. When ChatGPT shows the card, do not repeat its images or URLs. Without a card, use the returned Markdown where supported or link the same URL. Reuse unexpired URLs; never mint twice for one image. Each URL counts its vehicle image for the month at creation (1 credit on the legacy credit meter); loads within the TTL add nothing and are publicly cacheable. Each image names its vehicle like get_car_image: look each distinct vehicle up once (resolve_vehicle, search_vehicles or decode_vin, all free) and pass its id as vehicle, or send make, model and year in catalog spelling. Each takes any paint color (a preset or a hex) and the same sizing options (width, height, fit, background, framing, trim, padding, shadow); format auto makes the URL serve webp or png per viewer. For email, CMS pages or documents that outlive a TTL, set renew: true with ttl_seconds 604800: the URL keeps serving past expiry, renewing in each opened week (one more credit per week on the legacy credit meter), for up to renew_days. Pass idempotency_key when the call might be repeated: a retry with the same key and arguments replays the first result instead of billing again. Returns id, url, markdown, expires_at, max_uses, renews_until and the normalized vehicle for each image. Prefer this over get_car_image for HTML, Markdown files, documents, emails and websites. For a mailer or email send, pass campaign and each image's pieces (how many pieces it appears in) when the human gives them; they never change an image or the charge. State expiry briefly.",
|
|
1535
1590
|
inputSchema: MCP_TOOL_SCHEMAS.create_car_image_urls,
|
|
1536
1591
|
outputSchema: MCP_TOOL_OUTPUT_SCHEMAS.create_car_image_urls,
|
|
1537
1592
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
@@ -1584,14 +1639,6 @@ export const MCP_TOOLS = {
|
|
|
1584
1639
|
outputSchema: MCP_TOOL_OUTPUT_SCHEMAS.list_webhooks,
|
|
1585
1640
|
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
1586
1641
|
},
|
|
1587
|
-
rate_image: {
|
|
1588
|
-
name: "rate_image",
|
|
1589
|
-
title: "Rate a delivered image",
|
|
1590
|
-
description: "Free. Record quality feedback on a delivered image, either by the request_id returned with it or by vehicle (make, model, year, or a vehicle id, plus view and color). Provide verdict good|bad or rating 1-5 and an optional reason. Feedback drives re-renders and prompt improvements.",
|
|
1591
|
-
inputSchema: MCP_TOOL_SCHEMAS.rate_image,
|
|
1592
|
-
outputSchema: MCP_TOOL_OUTPUT_SCHEMAS.rate_image,
|
|
1593
|
-
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
1594
|
-
},
|
|
1595
1642
|
describe_api: {
|
|
1596
1643
|
name: "describe_api",
|
|
1597
1644
|
title: "Describe the REST API",
|
|
@@ -1679,6 +1726,14 @@ export const MCP_TOOLS = {
|
|
|
1679
1726
|
outputSchema: MCP_TOOL_OUTPUT_SCHEMAS.report_issue,
|
|
1680
1727
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
1681
1728
|
},
|
|
1729
|
+
report_image: {
|
|
1730
|
+
name: "report_image",
|
|
1731
|
+
title: "Report an image or a missing vehicle",
|
|
1732
|
+
description: "Free. Use it when the human says a picture is the wrong car, generation, angle or paint (type wrong_image), is poorly drawn (poor_quality), or that a vehicle is missing from the catalog (missing_vehicle: make, model and year only). Name the image by request_id or asset_id when you have one, else by vehicle with view and color. One call files a tracked report and starts the fix: reports from enough accounts take the image out of service while it is redrawn; a missing vehicle joins the catalog request. A repeat on the same image folds into the open report (created: false, same id). Show the human the report's url, a page private to their account, and keep its id. No personal data in reason or external_ref. Not for API errors: that is report_issue.",
|
|
1733
|
+
inputSchema: MCP_TOOL_SCHEMAS.report_image,
|
|
1734
|
+
outputSchema: MCP_TOOL_OUTPUT_SCHEMAS.report_image,
|
|
1735
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
1736
|
+
},
|
|
1682
1737
|
list_feedback: {
|
|
1683
1738
|
name: "list_feedback",
|
|
1684
1739
|
title: "List the feedback board",
|
|
@@ -1823,7 +1878,7 @@ export const API_REFERENCE = [
|
|
|
1823
1878
|
`format (${FORMATS.join("|")}|auto; default png; auto negotiates webp/png from Accept)`,
|
|
1824
1879
|
"market (optional; the market of sale as an ISO 3166-1 alpha-2 code such as AU, any case; the account's default market when omitted; never part of what the image is: the same vehicle, color and view is one image and one counted vehicle image under any market)",
|
|
1825
1880
|
],
|
|
1826
|
-
returns: "image bytes; headers X-Credits-Charged (0 on a plan), X-Vehicle-Images-Used, X-Vehicle-Images-Included (a number or unlimited; X-Credits-Remaining instead on the legacy credit meter), X-Image-Source (cache|generated), X-Image-Width, X-Image-Height, X-Vehicle-Appearance (default, or default; market=AU: which appearance was served, the default one for every market today), ETag, X-Request-Id (Vary: Accept with format=auto). With Accept: application/json: {data:{url,expires_at,vehicle:{vehicle_id,make,model,year,view,color,…},width,height,format,appearance:{market,scope}}, billing:{credits_charged:0, vehicle_images:{used,included}} (credit meter: {credits_charged,credits_remaining}), request_id}",
|
|
1881
|
+
returns: "image bytes; headers X-Credits-Charged (0 on a plan), X-Vehicle-Images-Used, X-Vehicle-Images-Included (a number or unlimited; X-Credits-Remaining instead on the legacy credit meter), X-Image-Source (cache|generated), X-Image-Width, X-Image-Height, X-Vehicle-Appearance (default, or default; market=AU: which appearance was served, the default one for every market today), X-Image-Verified (YYYY-MM-DD the exact bytes were compared with the manufacturer's material for that model year and matched; absent when not checked, which does not mean wrong), ETag, X-Request-Id (Vary: Accept with format=auto). With Accept: application/json: {data:{url,expires_at,vehicle:{vehicle_id,make,model,year,view,color,…},width,height,format,appearance:{market,scope}}, billing:{credits_charged:0, vehicle_images:{used,included}} (credit meter: {credits_charged,credits_remaining}), request_id}",
|
|
1827
1882
|
errors: ["400 invalid params (also vehicle together with make/model/year)", "401 missing/invalid key", "402 plan_image_limit (used, included, requested, resets_at, pack_url, checkout_url; nothing charged; legacy credit meter: insufficient credits)", "404 vehicle not in catalog or unknown vehicle id", "429 rate limited (Retry-After)", "502 render failed (refunded)", "503 generation_at_capacity: new renders resume at reset_at (Retry-After; nothing charged)"],
|
|
1828
1883
|
notes: "On 402 stop: images already received this month keep serving; hand the human checkout_url (a higher plan) with the price, or pack_url (Image Packs); buy only when they ask or a spending mandate they set covers it. Respect Retry-After on 429.",
|
|
1829
1884
|
sdk: "client.getImage({ make, model, year, view, color, size, width, height, aspectRatio, resolution, fit, background, framing, trim, padding, shadow, format, market }) / client.getImage({ vehicle: 'veh_…', color: '#1a2b3c' }) / client.getImageUrl(...)",
|
|
@@ -1882,6 +1937,36 @@ export const API_REFERENCE = [
|
|
|
1882
1937
|
sdk: "client.resolve(query, { market })",
|
|
1883
1938
|
cli: "car-image resolve red 2024 porsche 911 side view [--market AU]",
|
|
1884
1939
|
},
|
|
1940
|
+
{
|
|
1941
|
+
method: "POST",
|
|
1942
|
+
path: "/api/v1/images/reports",
|
|
1943
|
+
summary: "Report a wrong image (the wrong car, generation, angle or paint), a poor image, or a vehicle the catalog lacks. One tracked report that starts the fix: open reports from 2 accounts take an image out of service while it is redrawn; a missing vehicle joins the catalog request. A repeat from the same account on the same image (or vehicle) folds into the open report.",
|
|
1944
|
+
auth: "bearer",
|
|
1945
|
+
credits: "free (5,000 reports a day per account)",
|
|
1946
|
+
params: [
|
|
1947
|
+
"type (wrong_image|poor_quality|missing_vehicle; default poor_quality for category quality, else wrong_image)",
|
|
1948
|
+
"category (identity|camera|paint for wrong_image, default identity; quality for poor_quality)",
|
|
1949
|
+
"an image: asset_id | request_id (the X-Request-Id that delivered it) | vehicle or make+model+year with view?, color?",
|
|
1950
|
+
"missing_vehicle: make, model, year only",
|
|
1951
|
+
"reason? (≤500), external_ref? (≤100, your own id; returned in webhooks)",
|
|
1952
|
+
],
|
|
1953
|
+
returns: "201 {data:{object:'image_report', id, url, type, status (reported|flagged|repaired|closed), flagged, category, asset_id, vehicle:{make,model,year}, view, color, reason, external_ref, report_count, created_at}, created:true, request_id}; 200 with created:false when folded",
|
|
1954
|
+
errors: ["400 invalid_body (unknown field, missing target)", "401", "404 (no such image or vehicle id)", "429 (daily report limit)"],
|
|
1955
|
+
notes: "Prefer request_id or asset_id. url is the report's page, private to the account. image.issue_reported / image.issue_resolved (and vehicle.available) webhooks carry report_id and external_ref to the reporting account only.",
|
|
1956
|
+
sdk: "client.reportImage({ requestId, category: 'identity', reason }) / client.reportImage({ type: 'missing_vehicle', make, model, year })",
|
|
1957
|
+
cli: "car-image feedback report-image --request-id <id> --category identity | car-image feedback report-image --type missing_vehicle --make … --model … --year …",
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
method: "GET",
|
|
1961
|
+
path: "/api/v1/images/reports/{id}",
|
|
1962
|
+
summary: "One of your image reports with its status now; another account's is a 404.",
|
|
1963
|
+
auth: "bearer",
|
|
1964
|
+
credits: "free",
|
|
1965
|
+
returns: "200 {data:{object:'image_report', …}, request_id}",
|
|
1966
|
+
errors: ["401", "404"],
|
|
1967
|
+
sdk: "client.getImageReport(id)",
|
|
1968
|
+
cli: "car-image feedback report-image show <id>",
|
|
1969
|
+
},
|
|
1885
1970
|
{
|
|
1886
1971
|
method: "GET",
|
|
1887
1972
|
path: "/api/v1/vehicles",
|
|
@@ -2010,7 +2095,7 @@ export const API_REFERENCE = [
|
|
|
2010
2095
|
summary: "Plan and renewal (plan.meter: vehicle_images, or credits for accounts that paid before 2026-10-25), this month's vehicle images against the plan, credits (for 3D models, logos and upgrades), the next plan with its checkout link, payment method, 30-day usage, key scopes.",
|
|
2011
2096
|
auth: "bearer",
|
|
2012
2097
|
credits: "free",
|
|
2013
|
-
returns: "{data:{credits, auto_reload, has_payment_method, plan:{…, meter, limits:{images_per_month,…}}, default_market (the account's default market of sale, or null; set on the dashboard's organization page), pricing, usage_30d:{requests,images,cache_hit_rate}, limits_usage:{period, meter, vehicle_images_this_month:{used,limit,remaining}|null, distinct_vehicles_this_month:{used,limit,remaining}|null (credit meter), api_keys:{used,limit,remaining}, requests_per_minute_per_key, requests_per_minute_per_account}, renews_at, next_plan:{id,name,price,adds,checkout_url}, key:{prefix,scopes}}, links, request_id}",
|
|
2098
|
+
returns: "{data:{credits, auto_reload, has_payment_method, plan:{…, meter, limits:{images_per_month,…}}, default_market (the account's default market of sale, or null; set on the dashboard's organization page), terms:{version ('2026-10-12' for an account that paid before 2026-10-25, until its cutover; else '2026-10-25'), legacy, cutover_at (null = none scheduled), after_plan (the license rule when a paid plan ends, quoted from /terms), url}, pricing, usage_30d:{requests,images,cache_hit_rate}, limits_usage:{period, meter, vehicle_images_this_month:{used,limit,remaining}|null, distinct_vehicles_this_month:{used,limit,remaining}|null (credit meter), api_keys:{used,limit,remaining}, requests_per_minute_per_key, requests_per_minute_per_account}, renews_at, next_plan:{id,name,price,adds,checkout_url}, key:{prefix,scopes}}, links, request_id}",
|
|
2014
2099
|
sdk: "client.account()",
|
|
2015
2100
|
cli: "car-image whoami (alias: account)",
|
|
2016
2101
|
},
|