Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: CraterView.ai Keys API
description: 'CraterView.ai image enhancement and restoration API. ## How a job works
Three calls — upload to a presigned URL, run a job, and download the result. 1. `POST /v1/uploads` — get a presigned URL and an `input_key`
2. `PUT` your bytes to that URL
3. `POST /v1/jobs` — submit `input_key` plus parameters
Inference is asynchronous, because a job can occupy a GPU for minutes. Add `?wait=30` to
step 3 and a fast job comes back finished in the same response; otherwise poll
`GET /v1/jobs/{id}` or supply a `webhook_url`. ## Collecting the result
A finished job carries two links to the same object under `result.output`, both presigned
and both expiring. `url` serves it inline, for displaying a result in a page. `download_url` carries `Content-Disposition: attachment`, so a browser saves it under a
filename instead. Pick by what you are doing with it; a client cannot convert one into the
other, because the disposition is signed into the URL. ## Output format
By default the result comes back in the format you sent — a JPEG upload returns a JPEG —
except that a HEIC or HEIF photograph prefers JPEG and a TIFF scan comes back as PNG: the
platform reads those formats and does not write them. `output_format` names another. Either is a preference: kept wherever that format holds the
picture, and PNG where it does not — an alpha channel asked for as JPEG, more than 8 bits asked
for as JPEG or WebP, a result wider than the format holds. `result.output.content_type`
says which format came back. ## When a job fails
A failed job carries two fields. `error` is a sentence meant for a person and is reworded
whenever it can be made clearer, so show it rather than match on it. `error_code` is the
stable half, and it is what to branch on. **A job that produces no output is not charged**, whoever''s fault it was, so a failed job
always leaves your balance where it started. What the code tells you is whether retrying is
worth anything. `inference_failed` means the fault was ours and the same request is worth
sending again. Every other code refuses the request as you sent it, so an identical retry
fails identically — change something or tell the person who made it. A job that succeeded
with a result that is *wrong* is not a failure the API can see; report it with the job''s
`id` (see *Reporting a problem*). This list is not closed. New codes appear as new things become worth telling apart, so treat
an unfamiliar one as a failure you have no special handling for rather than as an error in
itself; a client that rejects a code it does not know breaks on the next one added. | `error_code` | What it means |
| --- | --- |
| `inference_failed` | Something on our side failed. Nothing was charged — a job is charged only when it succeeds — and the same request is worth sending again. |
| `unreadable_image` | The file is not an image the service can read: it may be damaged, in a format the service does not take, or not an image at all. Re-save or re-export it as PNG or JPEG; the same request will not succeed as it stands. |
| `undecodable_image` | The file starts as an image but its pixels cannot be read to the end: it is damaged, or was cut short, for instance by an upload that did not finish. Re-save or re-export it; the same request will not succeed as it stands. |
| `unsupported_tiff` | The TIFF stores its pixels in a form the service does not read: floating-point, signed or 32-bit samples; 16-bit CMYK, Lab or white-is-zero greyscale; colour planes stored separately; premultiplied transparency; or a compression other than LZW, ZIP or PackBits at 16 bits. Re-save it as 8- or 16-bit RGB or greyscale; the same request will not succeed as it stands. |
| `format_not_accepted` | The file is in a format the model does not take, whatever type it was uploaded as. The model''s `accepts` lists the formats it takes; convert the file to one of them. The same request will not succeed as it stands. |
| `no_face_found` | The model frames a headshot around a face and found none.'
version: 0.1.0
servers:
- url: https://api.craterview.ai
tags:
# --- truncated at 32 KB (38 KB total) ---
# Full source: https://artifacts.apis.io/craterview-ai/openapi/craterview-ai-keys-api-openapi.yml