Logo

API Setup

Get your API key and configure your environment.

API Setup

To interact with the Fit-it-on Developer API, you must authenticate your requests using a secure Developer API Key.


Generating an API Key

  1. Log into your Fit-it-on Dashboard.
  2. Navigate to Developer > API Keys in the left sidebar.
  3. Click the Generate New Key button.
  4. Copy your new secret key (it will always begin with fio_sk_...).

Store this key safely! For security purposes, you will not be able to view this key again after closing the generation dialog. If you lose it, you must revoke it and generate a new one.


Authentication

All API requests must include your API key in the Authorization header as a Bearer token.

curl https://fititon.app/api/v1/run \
  -H "Authorization: Bearer fio_sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_name": "tryon",
    "inputs": { ... }
  }'

Asynchronous Workflow

The Fit-it-on generation endpoints (like /v1/run) operate asynchronously. This means that your initial request will return immediately with a job tracking ID, rather than waiting for the generation to complete.

Step 1: Submit a Job

Make a POST request to https://fititon.app/api/v1/run to queue a generation job. You will receive an immediate response:

{
  "id": "123a87r9-4129-4bb3-be18-9c9fb5bd7fc1",
  "status": "starting",
  "created_at": "2026-07-17T11:00:00Z",
  "error": null,
  "output": null
}

Step 2: Poll for Results

Use the returned id to periodically check the status of your generation by making a GET request to https://fititon.app/api/v1/status/{id}.

curl https://fititon.app/api/v1/status/123a87r9-4129-4bb3-be18-9c9fb5bd7fc1 \
  -H "Authorization: Bearer fio_sk_YOUR_SECRET_KEY"

The response will indicate the current state of your job. When status is "completed", the output field will contain the URLs of the generated images or videos.

{
  "id": "123a87r9-4129-4bb3-be18-9c9fb5bd7fc1",
  "status": "completed",
  "output": [
    "https://cdn.fititon.app/users/123/results/result-123.png"
  ],
  "error": null,
  "created_at": "2026-07-17T11:00:00.000Z",
  "updated_at": "2026-07-17T11:00:25.000Z"
}

Making your first request

You can test your key by fetching your current remaining developer credits and checking your plan:

curl https://fititon.app/api/v1/credits \
  -H "Authorization: Bearer fio_sk_YOUR_SECRET_KEY"

If successful, this will return a JSON object with your current plan and remaining credits.