Skip to content

CanvasAnvil is an open source AI diagram maker and flowchart generator - an infinite-canvas diagram editor and self-hosted drawio alternative that writes editable .drawio files. Text to diagram, then fix nodes, layout and labels in place. Also AI presentations, interior design CAD/BOM, posters and infographics.

1.3 KB
Raw Blame

Image Config

Image generation uses config/image-provider.json.

Only OpenAI-compatible endpoints are supported. There is no vendor field: point baseUrl at whichever compatible gateway serves the model.

Required keys

  • apiKey
  • model

Optional keys

  • baseUrl -- defaults to https://api.openai.com/v1

File Path

  • config/image-provider.json inside this skill folder
  • the scripts find it from their own location, so they can run from any working directory
  • pass --config-file <path> to use a different file (resolved from the working directory)

Setup

The file holds a secret and is git-ignored. On first use, copy config/image-provider.example.json to config/image-provider.json and fill it in. Never commit the filled file.

Example

{
  "apiKey": "YOUR_KEY",
  "baseUrl": "https://api.openai.com/v1",
  "model": "gpt-image-1"
}

Endpoint

Chosen from the model name, not from configuration:

  • gpt-image-* and dall-e-* use the images endpoint
  • every other model returns its image through chat completions

Rule

  • template generation and slide generation read the same config file by default
  • do not ask the user to paste API keys into chat
  • if apiKey or model is missing, stop and tell the user to fill the config file