DataXID

Error Codes

Every error code, when it occurs, how to resolve it.

Every error response follows the same envelope:

{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_invalid",
    "message": "n_samples must be > 0",
    "doc_url": "https://docs.dataxid.com/docs/errors#parameter_invalid",
    "param": "n_samples"
  },
  "request_id": "req_abc123"
}
FieldTypeDescription
typestringError category (see Error Types)
codestringMachine-readable error code (unique, stable)
messagestringHuman-readable description
doc_urlstringLink to this page for the specific error code
paramstringWhich parameter caused the error (when applicable)
request_idstringInclude this in support requests

Error Types

TypeDescription
authentication_errorAPI key missing or invalid
invalid_request_errorBad parameters, wrong model state, or idempotency conflict
not_found_errorResource does not exist (or belongs to another org)
rate_limit_errorToo many requests
quota_exceeded_errorMonthly usage quota exceeded
api_errorServer-side error (infrastructure issue, unexpected failure)

Error Code Reference

api_key_missing

HTTP Status401 Unauthorized
Typeauthentication_error
WhenRequest to /v1/* without an Authorization header

Example response:

{
  "error": {
    "type": "authentication_error",
    "code": "api_key_missing",
    "message": "Authorization header with Bearer token is required.",
    "doc_url": "https://docs.dataxid.com/docs/errors#api_key_missing"
  },
  "request_id": "req_abc123"
}

How to fix: Add the Authorization: Bearer <api_key> header to your request.


api_key_invalid

HTTP Status401 Unauthorized
Typeauthentication_error
WhenThe provided API key does not match any known key

How to fix:

  • Verify the key is correct (no trailing spaces, no truncation)
  • Check the key prefix: dx_test_ for sandbox, dx_live_ for production
  • If the key was revoked, generate a new one

parameter_invalid

HTTP Status400 Bad Request
Typeinvalid_request_error
WhenRequest body fails validation (missing required field, wrong type, out of range)

Example response:

{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_invalid",
    "message": "Value error, ensure this value is greater than 0",
    "doc_url": "https://docs.dataxid.com/docs/errors#parameter_invalid",
    "param": "body.config.batch_size"
  },
  "request_id": "req_abc123"
}

How to fix: Check the param field to identify which parameter is invalid. Refer to the API Reference for valid values.


model_not_found

HTTP Status404 Not Found
Typenot_found_error
WhenThe model ID does not exist, or belongs to a different organization

How to fix:

  • Verify the model ID (format: mdl_<12 hex chars>)
  • The model may have been deleted

Security: Cross-organization resources always return 404 — not 403 — to prevent information leakage.


model_not_ready

HTTP Status400 Bad Request
Typeinvalid_request_error
WhenOperation requires training or ready status, but model is in created, building, or failed state

Example response:

{
  "error": {
    "type": "invalid_request_error",
    "code": "model_not_ready",
    "message": "Model mdl_a1b2c3d4e5f6 is in 'created' state, cannot generate",
    "doc_url": "https://docs.dataxid.com/docs/errors#model_not_ready"
  },
  "request_id": "req_abc123"
}

How to fix:

  • Check model status with GET /v1/models/{id}
  • Wait for training to complete (status → trainingready)
  • If status is failed, check the error field and create a new model

training_service_unavailable

HTTP Status503 Service Unavailable
Typeapi_error
WhenTraining infrastructure is temporarily unavailable (scaling, maintenance)

How to fix:

  • Retry after a few seconds — infrastructure auto-scales and may need warm-up time
  • The SDK retries 5xx errors automatically with exponential backoff
  • If persistent, contact support with the request_id

idempotency_key_in_use

HTTP Status409 Conflict
Typeinvalid_request_error
WhenA concurrent request with the same Idempotency-Key is still being processed

How to fix:

  • Wait for the original request to complete, then retry with the same key (you'll get the cached response)
  • If you want a new request, use a different Idempotency-Key
  • Keys expire after 24 hours

quota_exceeded

HTTP Status402 Payment Required
Typequota_exceeded_error
WhenOrganization exceeded the monthly usage quota (free tier: 100K rows/month)

Example response:

{
  "error": {
    "type": "quota_exceeded_error",
    "code": "quota_exceeded",
    "message": "Monthly row quota exceeded. Upgrade your plan for additional capacity.",
    "doc_url": "https://docs.dataxid.com/docs/errors#quota_exceeded"
  },
  "request_id": "req_abc123"
}

How to fix:

  • Check your current usage at app.dataxid.com
  • Upgrade your plan for additional capacity
  • Usage resets at the beginning of each billing period

rate_limit_exceeded

HTTP Status429 Too Many Requests
Typerate_limit_error
WhenOrganization exceeded the request rate limit (default: 60 requests/minute)

Example response:

{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Retry after 12 seconds.",
    "doc_url": "https://docs.dataxid.com/docs/errors#rate_limit_exceeded"
  },
  "request_id": "req_abc123"
}

Response headers:

HeaderExampleDescription
X-RateLimit-Limit60Requests allowed per window
X-RateLimit-Remaining0Requests remaining
X-RateLimit-Reset1708425060Unix epoch when window resets
Retry-After12Seconds to wait before retrying

How to fix:

  • Wait for the Retry-After duration, then retry
  • The SDK handles this automatically with exponential backoff
  • Rate limits are per organization, not per API key

internal_error

HTTP Status500 Internal Server Error
Typeapi_error
WhenUnexpected server error

How to fix:

  • Retry the request — transient errors often resolve on retry
  • The SDK retries 5xx errors automatically
  • If persistent, contact support with the request_id
  • In non-debug mode, the error message is generic for security

SDK Exception Mapping

The Python SDK maps API error codes to typed exceptions. Use these for structured error handling:

Error CodeSDK ExceptionDescription
api_key_missingdataxid.AuthenticationErrorMissing API key
api_key_invaliddataxid.AuthenticationErrorInvalid API key
parameter_invaliddataxid.InvalidRequestErrorBad request parameters
model_not_founddataxid.NotFoundErrorModel does not exist
model_not_readydataxid.ModelNotReadyErrorModel not in correct state
quota_exceededdataxid.QuotaExceededErrorUsage quota exceeded
rate_limit_exceededdataxid.RateLimitErrorToo many requests
idempotency_key_in_usedataxid.ConflictErrorDuplicate request in progress
training_service_unavailabledataxid.APIErrorInfrastructure unavailable
internal_errordataxid.APIErrorUnexpected server error

All exceptions inherit from dataxid.DataxidError:

import dataxid

try:
    synthetic = dataxid.synthesize(data=df)
except dataxid.AuthenticationError:
    print("Invalid API key")
except dataxid.QuotaExceededError as e:
    print(f"Quota exceeded. Upgrade: {e.upgrade_url}")
except dataxid.RateLimitError as e:
    print(f"Rate limited. Retry after: {e.retry_after}s")
except dataxid.DataxidError as e:
    print(f"Error: {e}")

On this page