Entwicklerplattform

Loconva API Documentation

Convert files through the hosted, token-metered Loconva API and integrate the same contract into scripts and command-line workflows.

Authentication

Create an API key from your account and send it as Authorization: Bearer fc_…. The full key is shown only once. Store it in an environment variable and never place it in browser code, repositories, screenshots, or logs.

Quick start

curl --fail-with-body \
  -H "Authorization: Bearer $LOCONVA_API_KEY" \
  -F "file=@photo.png" \
  -F "target=jpg" \
  "$LOCONVA_API_URL/api/v1/convert" \
  --output photo.jpg

Each successful file conversion costs one token. Validation and conversion failures do not consume a token. Do not automatically retry conversion requests after an uncertain network failure.

Command-line client

pipx install ./cli
$env:LOCONVA_API_URL = "https://your-loconva.example"
$env:LOCONVA_API_KEY = "fc_…"
loconva formats
loconva convert photo.png --to jpg
loconva batch first.png second.png --to webp --output-dir converted

Use export instead of $env: in POSIX shells. The CLI never stores credentials and supports --json for automation.

Endpoint reference

API-Vertrag wird geladen…

Errors and request IDs

JSON errors contain a stable code, a human-readable error, and a request_id. Every v1 response also includes X-Request-ID. Share that ID with support; never share your API key or source file.

MCP roadmap

A future local stdio MCP adapter will reuse this API contract for list_formats, get_balance, and convert_file. It will require explicit local paths, disclose uploads and token costs, and return file resources rather than embedding large binary payloads. A hosted MCP endpoint is intentionally deferred until OAuth, consent, and audit controls are defined.