---
title: "Convert an image"
method: POST
path: "/images/conversions"
---

# Convert an image

`POST /images/conversions`

## Request

- Base URL: `https://scifig.ai/api/v1`
- URL: `https://scifig.ai/api/v1/images/conversions`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://scifig.ai/api/auth/oauth2/authorize`, token URL `https://scifig.ai/api/auth/oauth2/token`, scopes: `images:convert`)

## Headers

- `Idempotency-Key` string, required
- `Prefer` string

## Request body

- object
  - `image` string, uuid, required
  - `format` 'svg' | 'png' | 'pdf' | 'tiff' | 'pptx', required
  - `vector_mode` 'editable_text' | 'full_vector'
  - `dpi` union
    - 300
    - 600
    - 1000
  - `width` integer

## Response `200`

Finished job

- Job
  - `id` string, uuid, required
  - `kind` 'image_generation' | 'image_edit' | 'image_upscale' | 'image_conversion' | 'chart' | 'flowchart', required
  - `status` 'queued' | 'processing' | 'succeeded' | 'failed' | 'canceled', required
  - `created_at` string, date-time, required
  - `credits` object, required
    - `reserved` integer
    - `charged` integer
    - `refunded` integer
  - `outputs` object[], required
    - `file_id` string, uuid
    - `format` string
    - `download_url` string, uri
    - `expires_at` string, date-time
    - `width` integer: Pixel width, when the output is a raster image.
    - `height` integer: Pixel height, when the output is a raster image.
    - `editor_url` string, uri: Charts and flowcharts: opens the conversation in the SciFig web editor (the signed-in owner only).
  - `error` object, nullable, required
    - `code` string
    - `message` string
    - `details` object
  - `late_delivery_until` string, date-time

## Other responses

- `202`: Job accepted and still running. Flowchart SVG raster conversions are durable asynchronous jobs (10 minute total deadline including queue/cold start). With jobs:read, poll the Location URL after Retry-After seconds; do not create another job.
- `402`: Not enough credits. A rejected job may be recorded; top up or upgrade, then send a new request with a new Idempotency-Key.
- `413`: The request body or an uploaded file is over the limit (details.max_bytes).
- `429`: RATE_LIMITED (per-minute window, or a daily limit named in details.reason, e.g. DAILY_CONVERSION_LIMIT) or CONCURRENCY_LIMITED (too many running tasks). Wait Retry-After seconds and retry with the same Idempotency-Key.
- `default`: Error. Branch on error.code; never parse message. 503 responses carry Retry-After.

---

[API](https://skmtc.dev/scifig/apis/scifig-api.md) · [All operations](https://skmtc.dev/scifig/apis/scifig-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scifig/apis/scifig-api/revisions/e58cc7ec74fb?raw)
