API document
Invocation types for product generation
CodexDock creates owner-scoped AI work through one invocation API. Choose the generation type by the result shape your product needs: text, structured object, file, or image.
Create work
The same invoke shape works for every type.
Change type to select the worker capability and result contract. Use parameters for business context such as usage, count, locale, filename, scene ID, or target path.
Server-side invocation
const invocation = await codexdock.invoke({
type: "generate_object",
prompt: "Create four product cards.",
parameters: { count: 4, usage: "product-preview" },
});
// {
// invocationId: "inv_123",
// status: "pending",
// statusUrl: "/api/codexdock/invocations/inv_123",
// progress: {
// phase: "queued",
// steps: [
// { key: "received", status: "complete" },
// { key: "processing", status: "pending" },
// { key: "result", status: "pending" }
// ]
// }
// }