TheaimartAIxDOCS
HomeGet API key

Developer questions and verified answers

Use this reference for direct answers, request examples and explicit limits. Contract fixtures are local evidence; they do not establish live inference.

What is Theaimart AIx?

Theaimart AIx is a unified AI inference API with a public model billing catalog and developer documentation. Use the documented endpoint for each modality and verify deployed model capabilities before relying on them.

Details

AIx standardizes request entry points and billing access. A catalog listing establishes configured billing facts, not upstream identity or measured model quality.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs

Who provides the AIx API?

Theaimart is the organization identified by this repository as the provider of Theaimart AIx. AIx is the inference platform, and the AIx API is its HTTP interface.

Details

The website, documentation and API have separate canonical URLs. Organization identity here is a repository fact rather than an independent legal certification.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs

What is the AIx API base URL?

The documented inference base URL is https://api.aix.theaimart.co/v1. Append a documented path such as /chat/completions to this base URL.

Details

The public website is https://aix.theaimart.co. The billing catalog uses /api/v1/models on the API origin and has a different response contract from /v1/models.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/api/overview

Where are AIx docs?

Public AIx documentation begins at /docs. Start with the quickstart for a first request, then use the endpoint reference for fields, responses and errors.

Details

The sidebar groups getting-started pages, concepts, API reference and operational guidance. Documentation search indexes built public content and requires no private credentials.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs

Where can I see AIx prices?

Use /models to inspect configured USD prices and billing units. Static values are dated snapshots, and the page can load a newer public billing catalog.

Details

A price must retain its per-million-token, per-image or per-minute unit. A billing listing is not a successful-inference or upstream-identity check.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: models

How do I get an AIx API key?

Sign in, open the API-key dashboard, and create a key for the application that will call AIx. Keep the secret in the backend environment and restrict its scope where supported.

Details

The browser account session and the inference API key are different credentials. Do not place a shared billing key in client-side JavaScript or support messages.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/authentication

How do I sign in to AIx?

Open /login to sign in through the existing account flow. Successful account sign-in is separate from supplying a bearer API key to an inference endpoint.

Details

After signing in, the dashboard exposes key and billing controls. This documentation does not simulate account ownership or claim that a real account login was tested.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: login

Does AIx support streaming?

The inspected chat contract accepts stream: true and returns server-sent events. A streaming client must parse event framing and handle termination or interrupted output.

Details

Read data events rather than assuming a network chunk contains one event. The documented chat stream uses chat.completion.chunk payloads and a data: [DONE] terminal marker.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/streaming

Does AIx support images?

The inspected API includes POST /v1/images/generations. Choose an image model identifier from the billing catalog and send the fields documented by the image reference.

Details

Image billing uses configured image units. A model listing does not establish that every image size, output format or provider-specific option is supported.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/api/images

What are AIx verification limitations?

A public billing listing verifies configured identifiers, modalities, prices and units. Context limits, advanced features, upstream identity and production inference remain unknown until separately verified.

Details

The registry records unknown fields as null rather than inventing values. Mock tests establish application and contract behavior against fixtures, not live provider behavior.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/verification

What is an AI API?

An AI API is a programmatic interface for sending input to an inference service and receiving generated or transformed output. A useful integration defines authentication, request shape, output handling and failure behavior.

Details

For AIx, start with a small server-side chat request. The client must still validate output and bound usage rather than treating generated text as trusted instructions.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs

How does a unified inference API work?

A unified inference API gives the application a common entry point while the service selects an eligible backend route. AIx documents route eligibility, errors and billing separately from model quality.

Details

Keep application timeouts, retry limits and result validation even when a gateway handles provider routing. Gateway failover does not remove every application failure state.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/concepts/routing

What is an OpenAI-compatible endpoint?

An OpenAI-compatible endpoint accepts documented request and response shapes associated with that API style. Compatibility must be checked per endpoint and feature; it is not a guarantee that every SDK method works.

Details

AIx documents chat completions, models and modality-specific endpoints. Provider-specific extensions and optional capabilities still require contract and deployment checks.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/api/overview

How do I choose an AI API integration?

Choose raw HTTP when you want a small explicit request boundary, or a compatible upstream SDK when its supported methods fit the documented contract. No dedicated AIx SDK is established by this repository.

Details

The tested examples use Python standard-library HTTP and Node native fetch. Installation and compatibility claims for third-party SDKs require version-specific verification.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/sdks

How do I secure an inference backend?

Keep the API key on an authenticated backend, validate the caller and payload, and constrain model choices, output size and spending. Hiding a key behind an unrestricted proxy does not protect its billing authority.

Details

Log sanitized status and duration rather than bearer tokens or private prompts. Escape text before HTML rendering and validate generated data before acting on it.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: blog/ai api key security

Which AIx models are listed?

The /models page lists the model identifiers in the checked-in billing snapshot and can request the public live catalog. Every snapshot entry has a configured modality, USD rate and billing unit.

Details

Generated model reference pages reuse those same commercial facts. Listing a model is distinct from verifying its upstream identity or current execution route.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: models

How do I find an exact model ID?

Read the exact model identifier from GET /v1/models or the billing catalog, then send that identifier in the model field. Do not substitute an internal catalog UUID for the canonical model name.

Details

The two catalog endpoints have different response shapes. The billing endpoint exposes model and price fields; the compatible models endpoint exposes data entries with id fields.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/api/models

What context limits does AIx verify?

Per-model context and maximum-output limits are not independently verified by the billing snapshot. Treat unknown registry limits as unknown and test a permitted deployment before sizing large inputs.

Details

A gateway request-validation ceiling is not proof of a model context window. Context capacity, output limits and price units describe different constraints.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/verification

Can every model call tools?

Do not assume every model supports tool calling. The request contract exposes tools and tool_choice, but usable support depends on the selected model and eligible execution route.

Details

Validate tool schemas, handle tool results as untrusted input and enforce application authorization. A tool declaration alone does not grant permission to execute an action.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/guides/tool calling

How should I verify model identity?

Verify upstream model identity using operator-controlled route configuration and a permitted integration environment. A catalog model name or price does not independently prove the backend model identity.

Details

Document the verified route, revision and test conditions when evidence is available. Do not infer identity from a response style or a marketing label.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/verification

How do I call AIx from Python?

Use a server-side Python HTTP request with JSON, a bearer credential, a canonical model ID and a finite timeout. The repository provides a complete standard-library client with mocked success and failure tests.

Details

Set AIX_KEY and AIX_MODEL in the process environment. The example does not automatically retry a timed-out generation because completion and billing may be uncertain.

Practical example

"""Python 3.10+ standard-library HTTP integration, not an AIx SDK.
Mock-tested request shape; authenticated inference has not been live-tested.
Run: AIX_KEY=... AIX_MODEL=... python3 examples/chat.py
"""
import json
import os
import urllib.error
import urllib.request


def chat(key, model, opener=urllib.request.urlopen):
    request = urllib.request.Request(
        'https://api.aix.theaimart.co/v1/chat/completions',
        data=json.dumps({'model': model, 'messages': [
            {'role': 'user', 'content': 'Explain an HTTP timeout in one sentence.'}
        ], 'max_tokens': 128, 'stream': False}).encode(),
        headers={'Authorization': f'Bearer {key}', 'Content-Type': 'application/json'},
        method='POST',
    )
    try:
        with opener(request, timeout=30) as response:
            result = json.load(response)
        return result['choices'][0]['message']['content']
    except urllib.error.HTTPError as error:
        # Do not print request headers, credentials or provider error bodies.
        status = error.code
        error.close()
        raise RuntimeError(f'AIx returned HTTP {status}; inspect status-specific guidance.') from None
    except (urllib.error.URLError, TimeoutError):
        raise RuntimeError('Connection failed or timed out; completion and billing may be uncertain.') from None
    except (ValueError, KeyError, IndexError, TypeError):
        raise RuntimeError('Unexpected response shape; inspect the API contract.') from None


if __name__ == '__main__':
    key = os.environ.get('AIX_KEY')
    model = os.environ.get('AIX_MODEL')
    if not key or not model:
        raise SystemExit('Set AIX_KEY and AIX_MODEL in the server environment.')
    try:
        print(chat(key, model))
    except RuntimeError as error:
        raise SystemExit(str(error)) from None

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: blog/python ai api request

How do I call AIx from Node.js?

Use Node native fetch from a backend process and send the documented JSON request. The repository example bounds the request with AbortSignal.timeout and checks status and response shape.

Details

This is an HTTP integration, not a claimed official AIx SDK. Keep its credential off the browser and test malformed responses and connection failures.

Practical example

/** Node.js 20+ native HTTP example, not an official AIx SDK.
 * Mock-tested; authenticated inference has not been live-tested. */
export async function chat(key, model, fetcher = fetch) {
  let response;
  try {
    response = await fetcher('https://api.aix.theaimart.co/v1/chat/completions', {
      method: 'POST',
      headers: { Authorization: `Bearer ${key}`, 'Content-Type': 'application/json' },
      body: JSON.stringify({ model, messages: [{ role: 'user', content: 'Explain an HTTP timeout in one sentence.' }], max_tokens: 128, stream: false }),
      signal: AbortSignal.timeout(30_000),
    });
  } catch { throw new Error('Connection failed or timed out; completion and billing may be uncertain.'); }
  if (!response.ok) throw new Error(`AIx returned HTTP ${response.status}; inspect status-specific guidance.`);
  const result = await response.json();
  const content = result.choices?.[0]?.message?.content;
  if (typeof content !== 'string') throw new Error('Unexpected response shape; inspect the API contract.');
  return content;
}
if (process.argv[1]?.endsWith('/chat.mjs')) {
  if (!process.env.AIX_KEY || !process.env.AIX_MODEL) throw new Error('Set AIX_KEY and AIX_MODEL in the server environment.');
  chat(process.env.AIX_KEY, process.env.AIX_MODEL).then(console.log).catch((error) => { console.error(error.message); process.exitCode = 1; });
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/sdks

How do I make a curl AI request?

Send a POST request to the documented endpoint with Authorization: Bearer, Content-Type: application/json and the required JSON fields. Use an environment variable for the secret.

Details

For chat, the required fields are model and messages. A curl example is a request template; live inference requires a valid permitted credential and credits.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/quickstart

How do I parse a chat response?

For the text-only chat example, read choices[0].message.content after checking HTTP success and the response shape. Empty choices, invalid JSON or a tool-only response need explicit handling.

Details

Do not assume every successful response contains a plain text answer. Tool calls and streams have their own handling paths.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/api/chat

How do I test an AI API client without credits?

Inject a controlled HTTP fixture into the client to test request shape, success, invalid responses and error statuses without using credits. Label those results as mocked contract tests.

Details

Keep live smoke tests separate. A fixture verifies your handling of that fixture, not availability, latency or billing behavior of an external service.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: blog/python ai api request

AI gateway versus direct API: what changes?

A gateway centralizes integration and may provide routing and billing controls; a direct provider API exposes that provider contract directly. Compare exact features and failure behavior rather than assuming universal compatibility.

Details

No blanket price, latency or quality advantage is established here. A fair comparison records versions, dates, workloads and missing data.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/concepts/providers

REST versus SDK for AI integrations?

Raw REST gives explicit control over HTTP; an SDK adds language-specific abstractions. Choose based on supported methods, dependency requirements and error handling rather than treating either as universally better.

Details

The repository HTTP examples run without a dedicated AIx SDK. A compatible SDK must still be configured with the right origin and secret.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/sdks

Streaming versus non-streaming AI responses?

Non-streaming chat returns one JSON response; streaming emits incremental SSE events. Streaming can improve progressive presentation, but the application must handle partial output and interruption.

Details

Neither response style guarantees a particular latency. Do not silently replace an interrupted partial answer with a second paid generation.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/streaming

Single token rate versus separate input/output pricing?

A single gateway rate applies to billed tokens, while a split-rate contract prices input and output separately. Preserve the exact unit and formula before comparing amounts.

Details

AIx inspected chat settlement uses a single configured billed-token rate. Do not relabel it as an upstream input-only or output-only price.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: blog/ai api pricing units

Billing listing versus available inference route?

A billing listing says a price and identifier are configured; a healthy inference route says a request can execute under specific conditions. These are separate observations.

Details

Retain unknown availability and identity fields until actual permitted evidence exists. A successful catalog GET does not prove a generation succeeded.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/verification

What does AIx HTTP 402 mean?

HTTP 402 in the inspected contract indicates insufficient credits or a spending-policy rejection. Check the balance and configured caps rather than repeatedly retrying the same unfunded operation.

Details

The client should surface a useful funding or policy action without exposing secrets. Real account balances are private and are not included in public documentation.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/errors

How do I handle AI API 429?

For a documented 429 rate-limit response, reduce concurrency and use a bounded retry policy. Respect a valid retry hint if present, but do not assume every deployment returns one.

Details

Separate request-rate limits, tokens-per-minute policies and application spending caps. Stop at the application deadline and avoid an unbounded retry loop.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/rate limits

Should I retry an AI request after timeout?

A timeout does not prove the server cancelled inference. Preserve an uncertain outcome and review duplicate-work risk before retrying a generation.

Details

Configured idempotency replay has deployment-dependent limits. It is not an unconditional exactly-once or never-billed-twice guarantee.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: blog/ai api error handling

What if an SSE stream disconnects?

Preserve partial text when an SSE stream disconnects and show an interruption state. Do not assume that an open HTTP connection or a partial event proves the complete answer was delivered.

Details

Buffer fragmented frames, validate event JSON and distinguish the terminal marker from a transport failure. A retry should be an explicit application decision.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/streaming

How do I diagnose an invalid model?

Check the exact model identifier, request modality and required parameters when the API reports an invalid model. Compare the canonical identifier with the relevant catalog rather than guessing an alias.

Details

A model may be configured for one modality but not another. Do not fix a bad request by sending arbitrary unsupported parameters repeatedly.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/api/errors

How do I estimate AI API costs?

Estimate cost by multiplying measured or assumed units by the verified rate in the same unit. Record assumptions and distinguish the estimate from actual settlement.

Details

For a per-million billed-token rate, divide tokens times rate by one million. Images and minutes need their own calculations; unknown prices are not zero.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: blog/ai api pricing units

Does AIx bill input and output separately?

The inspected AIx chat billing code applies one configured rate to billed tokens. It does not establish separate upstream input and output prices.

Details

Settlement can use reported usage or an estimate according to the implementation. Reconcile a real bill using actual usage records rather than an illustrative calculator.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/concepts/billing model

How are AIx image prices expressed?

AIx image billing listings express a configured USD amount per image. Read the exact model entry and current unit before estimating a job.

Details

A listed unit does not verify every image option or upstream identity. Account for the requested number of images and reject missing prices.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: models

How are AIx transcription prices expressed?

AIx transcription billing listings express a configured USD amount per minute. Preserve sufficient precision for sub-cent rates instead of rounding them into a different price.

Details

The inspected flow estimates a hold and settles using returned duration. Actual route behavior and production records require a permitted integration environment.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: models

How fresh is the AIx price snapshot?

The catalog and model pages display the snapshot verification date from the shared registry. The live catalog may be newer; verify current commercial facts before purchase.

Details

Changing an article timestamp does not refresh a price. CI compares commercial records and an external drift job can explicitly check a newer catalog.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/models

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/verification

How do I change my OpenAI base URL?

Change a compatible client base URL to https://api.aix.theaimart.co/v1 and supply an AIx API key. Then test the specific endpoint and features your application actually uses.

Details

Request-shape compatibility does not imply that every SDK extension, parameter or model capability is supported. Keep a rollback and a small permitted smoke test.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/guides/migrate from openai

Can I reuse SDK code with AIx?

Existing client code may be reusable for documented compatible methods after configuring the base URL and key. Verify request shape, response handling and error behavior against the AIx contract.

Details

Do not treat an SDK-wide compatibility claim as tested. The repository verified examples are explicit HTTP clients with controlled mocks.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/sdks

How do I change models on AIx?

Select another canonical catalog identifier in the model field, then verify modality, pricing and feature compatibility before switching production traffic. Test the replacement with representative requests before deploying the change.

Details

A shared request entry point does not make context windows, tool support or output quality identical. Evaluate task-specific behavior with permitted fixtures and smoke tests.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/models

How do I migrate a streaming UI?

Migrate a streaming UI by keeping the secret on the backend and adapting the SSE parser to the documented events. Handle partial output, cancellation and the terminal marker explicitly.

Details

Network chunks are not event boundaries. Retain cancellation and retry budgets even if the gateway routes requests internally.

Practical example

curl --fail-with-body https://api.aix.theaimart.co/v1/chat/completions \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V3.2","messages":[{"role":"user","content":"Explain HTTP timeouts."}],"max_tokens":128}'

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/guides/streaming ui

How do I configure AIx in an editor?

Configure the editor integration with the documented compatible base URL, an appropriately scoped key and a catalog model identifier. Verify the editor version and requested features.

Details

A tool accepting a custom URL is not proof that every feature works through the gateway. Never share a full key in an editor issue report.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/guides/editors/cline

Does AIx store responses?

Usage ledger records exclude message content, but configured non-streaming idempotency replay can cache completed response content for up to 24 hours. Upstream provider handling applies separately.

Details

Do not infer zero retention from a billing table. Production cache configuration and provider retention settings are operational facts requiring separate verification.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/concepts/data privacy

How do I rotate an AIx key?

Use the dashboard key lifecycle controls to replace or rotate a key, update the consuming service, verify the replacement and revoke the old credential. Treat an exposed key as an incident.

Details

For an active leak, containment can take priority over a smooth migration. Do not print either key during testing or store it in source control.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/authentication

Can I put an AI key in a browser?

Do not put a shared inference billing key in browser code. Keep it on a backend that authenticates callers and constrains request size, model access and usage.

Details

Public environment-variable prefixes ship values to the client. A backend proxy must still enforce authorization and spending limits.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: blog/ai api key security

What does AIx idempotency cache retain?

The inspected replay implementation can store a completed non-streaming response in Redis for up to 24 hours when configured. This content can include the completion.

Details

The cache is separate from metadata-only durable usage records. The configuration and upstream retention are not proven by a local contract fixture.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/concepts/data privacy

How do I set a spending cap?

Configure per-key daily or monthly spending policies through the existing authenticated controls where supported. The inspected backend enforces policies before billed work.

Details

A spending cap does not replace application authentication, concurrency limits or secret protection. Verify the actual configured policy with a permitted account test.

Practical example

{
  "website": "https://aix.theaimart.co",
  "inferenceBase": "https://api.aix.theaimart.co/v1",
  "documentation": "/docs",
  "keyLocation": "server environment; never in browser code"
}

Limitations

Contract inspection and controlled fixtures do not establish live inference, provider identity, current account state or external search visibility.

Further reading: docs/rate limits

Last updated October 21, 2026

Was this page helpful?