---
title: "Put Image Host Config"
method: PUT
path: "/api/user_settings/image_host"
tags: ["image_host"]
---

# Put Image Host Config

`PUT /api/user_settings/image_host`

Save config. If incoming `token` is empty/masked we keep the
existing real token — lets the SPA edit other fields without
re-prompting for the PAT.

`active_provider` is validated against the user's eligibility:
'cloud' requires a paid plan; 'github' requires the github config
to have repo+token after the merge step. Invalid choices → 400.

## Query parameters

- `authorization` unknown

## Request body

- ImageHostConfigIn — Write-side payload. provider determines which fields under `config` are honored. Unknown provider raises 400. `active_provider` is the user's chosen routing for figure uploads: - 'off' — no image hosting; system prompt skips the markdown image directive entirely. - 'github' — use the saved github config (PicGo-style). - 'cloud' — use /api/files cloud blob (paid only). Optional in the write payload — if omitted, the existing value is preserved. Lets the SPA send only the fields it changed.
  - `provider` string
  - `config` object
  - `active_provider` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/omicos/apis/omicos-server.md) · [All operations](https://skmtc.dev/omicos/apis/omicos-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/omicos/omicos-server/revisions/a00b94573ffe/schema)
