Skip to content

Developer docs

neofashion.ai API

Generate product photography, video, and campaign imagery programmatically. The same API the platform uses — available to your integration from day one.

Base URL

All endpoints are versioned under /api/v1 and served over HTTPS. The web app uses the same endpoints — there are no private, UI-only routes.

Base URL
https://app.neofashion.ai/api/v1

Authentication

Every request is authenticated with a bearer token. Two token types are supported, and both resolve to the same workspace context.

API key

For server-to-server integrations. Create keys in workspace settings; each key is scoped to your workspace. Available on Enterprise plans.

Authorization: Bearer ne_live_xxxxxxxxxxxx

Session JWT

Issued by the web app on login. Used by the platform UI itself and suited to short-lived, user-scoped calls.

Authorization: Bearer eyJhbGci...

All requests include a source field (ui or api) and an optional api_key_id for audit and billing purposes.

Endpoints

The core generation and read endpoints. Long-running work such as video and bulk generation runs asynchronously — poll the generation or follow status updates in the app.

Method Endpoint Description
POST /api/v1/generate/image Generate a single product photo
POST /api/v1/generate/video Generate a short fashion video
POST /api/v1/generate/bulk Async batch generation job
POST /api/v1/sketch-to-photo Sketch → campaign-quality photo
GET /api/v1/generations List generations (paginated)
GET /api/v1/generations/:id Generation detail + status
GET /api/v1/credits/balance Current credit balance
GET /api/v1/personas Workspace personas
GET /api/v1/models Brand DNA / personas API

Response shape

Every endpoint returns the same envelope: data, meta (credits used, credits remaining, request id), and error. Exactly one of data or error is set.

Success

{
  "data": {
    "id": "gen_01hwz...",
    "status": "completed",
    "output_url": "https://...",
    "credits_used": 50
  },
  "meta": {
    "credits_used": 50,
    "credits_remaining": 7950,
    "request_id": "req_01hwz..."
  },
  "error": null
}

Error

{
  "data": null,
  "meta": { "request_id": "req_01hwz..." },
  "error": {
    "code": "INSUFFICIENT_CREDITS",
    "message": "Credit balance too low for this operation.",
    "details": { "required": 50, "available": 20 }
  }
}

Rate limits

Limits apply per workspace. When a limit is exceeded, the API returns 429 RATE_LIMITED with a retry-after header.

Plan Rate limit
Enterprise Custom — agreed per contract, with SLA

Error codes

Errors are returned in the error field with a stable code, a human-readable message, and structured details.

Code HTTP Meaning
INSUFFICIENT_CREDITS 402 The workspace balance is too low for the requested operation. Top up or upgrade to continue.
UNAUTHORIZED 401 The token is missing, expired, or invalid.
FORBIDDEN 403 The token is valid, but the plan or role does not allow this operation.
NOT_FOUND 404 The resource does not exist or belongs to another workspace.
RATE_LIMITED 429 Too many requests — retry after the indicated interval.
PROVIDER_ERROR 502 An upstream AI provider failed. Credits are refunded and the request can be retried.

API access

Ready to integrate?

API access is available on Enterprise plans, with guided onboarding and an SLA. Book a demo and we'll walk through your integration.