v1 preview
GET STARTED/Your first request
API PREVIEWv1

Your first request

From one API key to a clear, traceable generation flow.

Platform preview. Real model providers are not connected yet. Requests and prices below describe the intended contract; examples are not live generation results.

POST/v1/tasks
Base URLYOUR_DEPLOYMENT_ORIGIN/v1
AuthenticationBearer YOUR_API_KEY

Start with the preview

APIstable is being built in two stages: the website, account system, and execution architecture first; real model providers next. The model catalog and prices currently illustrate the contract. They are not a claim that paid inference is available.

Examples on these pages describe the API preview. A provider-not-configured response is expected until a route is enabled. Copying a code example does not execute it or spend credits.

What works in this build

EndpointCurrent behavior
GET /v1/modelsPublic preview catalog; no key required.
POST /v1/quotesPublic input validation and sample pricing; no key required and no credit reservation.
GET /v1/balanceRequires a valid key with usage:read and a connected database.
GET /v1/tasks and /v1/tasks/{id}Reads stored account tasks with usage:read; an unknown ID returns 404.
POST /v1/tasks and /v1/chat/completionsAfter authentication and applicable validation: HTTP 503 provider_not_configured; no live generation or credit charge.

1. Create an API key

Sign in and open Console → API Keys. Save the complete key when it is created; it is only revealed once. Use a separate key for each app or environment.

Environment
export APISTABLE_BASE_URL="https://api.example.com"
export APISTABLE_API_KEY="YOUR_API_KEY"
export APISTABLE_IDEMPOTENCY_KEY="YOUR_UNIQUE_OPERATION_KEY"

Replace the example origin with your APIstable deployment. API keys belong in your server environment, never in browser code, query strings, or public repositories.

2. Quote, then submit

Choose an exact model ID and validate the input. A quote shows the eligible low-cost and official routes, the price per result, and the maximum reservation for the whole request. Direct API clients may submit without a separate quote call; the server still calculates and validates the price.

For images and videos, output_count creates 1–4 result items. fallback is off by default. When enabled, each item can independently try the official route after a confirmed eligible failure.

3. Keep the task ID

An accepted media request returns HTTP 202 and a stable task_id. Keep it and query that task instead of submitting again. A network timeout does not tell you whether the supplier accepted the generation.

  • Poll at a sensible interval and respect Retry-After. Check queued, running, falling_back, and reconciliation_required as non-final states.
  • Read each item, including successful results in a partially completed task. Download files before expires_at.
  • A failed notification does not invalidate a completed generation or repeat its charge.
Was this page useful?Something unclear?