API Fundamentals
The Fit-it-on Developer API provides programmatic access to our AI generation models. It follows standard REST architectural styles, uses predictable resource-oriented URLs, and accepts JSON-encoded request bodies.
Asynchronous Execution
All image generations are processed asynchronously. High-resolution AI renders (2k or 2048x2048 samples) take time, and a synchronous connection would inevitably time out.
- Submit a Job: You send a
POST /v1/runrequest with your input data. - Receive ID: The API immediately returns a
200 OKwith aprediction_id. - Poll for Status: You periodically call
GET /v1/status/{predictionId}. - Completion: When the status transitions to
succeeded, the URLs to your generated images will be available in theoutputarray.
Webhook Support
Alternatively, you can provide a webhook_url parameter in your initial POST request. Once the job finishes processing (whether it succeeds or fails), we will send a POST request directly to your webhook containing the final status payload, removing the need to manually poll.
Base URL
All requests must be made over HTTPS to our production environment:
https://fititon.app/apiContent Types
All POST and PATCH requests must include the following header to specify the payload format:
Content-Type: application/jsonThe API also returns all responses strictly in JSON format.
Webhooks
If you provide a webhook_url at the root of your JSON payload, we will send an HTTP POST request to that URL as soon as the asynchronous job completes (either successfully or with an error).
Webhook Payload Example:
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "success",
"output": [
"https://storage.fititon.com/results/result-123.jpg",
"https://storage.fititon.com/results/result-124.jpg"
],
"error": null,
"created_at": "2026-07-03T10:00:00.000Z",
"updated_at": "2026-07-03T10:00:15.000Z"
}Request Limits & Handling
To prevent abuse, the API enforces a rate limit based on your active Developer Plan tier.
If you exceed your limit, you will receive a 429 Too Many Requests error. Your application should gracefully handle this by implementing exponential backoff.
Your credit balance is independent of the rate limit. You can monitor your overall API usage and remaining credit balance via the Developer Dashboard, or programmatically via the account endpoints.
If the generation fails internally (e.g. an invalid image was passed, or a model timeout occurred), the GET /v1/status endpoint will return a status of failed, and the error property will contain a descriptive message. Your credits will not be deducted for failed jobs.
