DocumentationIntegration handbook 01—07

From one request.
To a working system

Understand the contract between input, tasks and results. Bring model capabilities into your products and workflows.

Start reading

Model APIs · MCP · ID Axis

01

Start with the intended outcome.

Integration starts with a business outcome: the input, the deliverable and the acceptance criteria. Design generation, image-to-3D and metric production share a calling pattern, but have different standards for their outputs.

  1. 01

    Choose a capability

    Define input and output for your task.

  2. 02

    Submit a task

    Create a server-side request and retain its task ID.

  3. 03

    Use the result

    Handle terminal states and validate artifacts before use.

Illustrative contract

The paths, fields and states below illustrate integration. Use the version agreed for your deployment. The example host is not a live service.

POST /v1/tasks · cURL
# Set the agreed base URL and a server-side credential first.
# The .invalid host is a placeholder, not a live service.
export IDENIFE_BASE_URL="https://api.example.invalid"
export IDENIFE_API_KEY="<server-side-credential>"

curl --request POST "$IDENIFE_BASE_URL/v1/tasks" \
  --header "Authorization: Bearer $IDENIFE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "capability": "design.generate",
  "input": {
    "prompt": "Design a low, elegant electric GT in liquid silver.",
    "constraints": {
      "view": "front_three_quarter",
      "material": "satin_metal"
    }
  },
  "output": {
    "format": "png"
  }
}'
202 / queued

Acceptance means the task has entered processing. Save task_id and query the task; read result after succeeded.

02

Keep credentials on the server.

The browser owns the experience; your backend owns identity, permissions and API calls. Have the frontend call your application service, which connects to the model with centrally managed credentials and access scopes.

Your interfaceBusiness input
Your backendIdentity · permissions · logs
Model & capability APIsTasks & artifacts
What the request should establish
Field / agreementPurposeHandling
AuthorizationServer identityUse the agreed credential mechanism. Keep credentials in server-side environment configuration or a secret manager.
Content-Typeapplication/jsonEncode the request with the agreed schema; agree file upload separately from task creation.
request_idRequest traceLink the returned request ID to application logs. Record status and error codes without full credentials or sensitive inputs.

Also agree how credentials are issued and rotated, whether access is project-scoped and how limits are reported. The Bearer example does not imply that every deployment uses the same authentication setup.

03

One task envelope. Explicit inputs.

Separate capability selection, input conditions and output requirements. Your backend can share task-management logic while each capability keeps its own validation and acceptance criteria.

capability
Select the capability to execute.
input
Carry task conditions and asset references.
output
Declare the requested delivery format.

Clear inputs make results assessable.

Illustrative capability inputs and outputs
CapabilityMain inputResult
design.generateBrief, material and view constraintsConcept image and artifact description
image.to_3dImage asset and requested output format3D mesh and material assets
data.metricsDataset reference, metric definition and dimensionsMetric definition and structured result

Pass images and datasets through agreed asset references. Check size, media type, access lifetime and data permissions before task creation. A generated 3D mesh is not the same as a parametric CAD solid.

Explore model capabilities
04

Tasks continue beyond a single request.

Separate longer jobs into submission, observation and result retrieval. The interface need not block: the task ID connects the business record, execution state and final artifact.

queued

Accepted, awaiting execution

running

Capability is executing

succeeded

Artifacts are ready

failed / cancelled

Failure and cancellation are terminal states. Retain the reason and task ID, then let application logic decide what comes next; do not blindly resubmit.

View a bounded polling exampleTypeScript
GET /v1/tasks/{task_id}
// Illustrative server-side TypeScript; adapt to the agreed contract.
async function waitForTask(taskId: string, signal: AbortSignal) {
  const baseUrl = process.env.IDENIFE_BASE_URL;
  const key = process.env.IDENIFE_API_KEY;
  if (!baseUrl || !key) throw new Error("Missing configuration");

  for (let attempt = 0; attempt < 20; attempt++) {
    signal.throwIfAborted();
    const response = await fetch(
      baseUrl + "/v1/tasks/" + encodeURIComponent(taskId),
      { headers: { Authorization: "Bearer " + key }, signal }
    );
    if (!response.ok) throw new Error("HTTP " + response.status);
    const task = await response.json();
    if (task.status === "succeeded") return task.result;
    if (["failed", "cancelled"].includes(task.status)) {
      throw new Error(task.error?.code ?? task.status);
    }
    await new Promise<void>((resolve, reject) => {
      const stop = () => {
        clearTimeout(timer);
        reject(signal.reason);
      };
      const timer = setTimeout(() => {
        signal.removeEventListener("abort", stop);
        resolve();
      }, 1500);
      signal.addEventListener("abort", stop, { once: true });
    });
  }
  throw new Error("Polling budget exceeded; preserve taskId");
}

A timeout is not task failure

A local timeout ends this observation attempt. Retain the task ID and check the existing task later to avoid duplicate outputs.

Retries need boundaries

Respect server delay guidance during throttling and set a retry budget. The contract must establish whether creation requests are retryable and whether idempotency keys are supported.

05

Usable results. Understandable failures.

Applications should not guess completion from free-form text. Separate state, artifacts and errors so rendering, archiving, retries and human follow-up have an explicit basis.

result.json
{
  "task_id": "task_demo_design_001",
  "status": "succeeded",
  "result": {
    "artifacts": [
      {
        "id": "asset_demo_001",
        "type": "image",
        "format": "png",
        "uri": "asset://demo/electric-gt.png"
      }
    ],
    "capability": "design.generate"
  },
  "request_id": "req_demo_001"
}
artifacts
Read outputs through artifact descriptors: format, type and access location. The example asset:// reference is a placeholder, not a download URL.
error.code
Branch on stable error codes and show appropriate user messages. Avoid parsing human-readable error text for control flow.
retryable
Indicates whether this failure is suitable for retry; still consider business state, retry budget and the API contract.
400 / 422Check structure and business conditions
401 / 403Check credentials and resource access
429Respect backoff and control concurrency
5xxRecord request ID and recover by policy

HTTP status and retry semantics: RFC 9110

06

APIs, tools and execution have distinct roles.

Model APIs invoke capabilities. MCP exposes tools and resources through a protocol. ID Axis organises reasoning and execution. They work together, with different responsibilities.

MCP

Make tools discoverable and callable.

This guide references MCP 2025-11-25. Clients negotiate capabilities, discover tools with tools/list and supply arguments through tools/call. Resources use resources/read.

Validate arguments against the tool schema. Handle tool-execution errors separately from protocol errors; tool descriptions do not grant business permissions.

MCP · Tools
ID Axis

Give execution context and state.

ID Axis coordinates multi-agent reasoning, task context, available tools, execution budgets and result handling, so multistep work can progress within clear boundaries.

For business writes, enforce permissions and necessary confirmation at the execution layer. Before recovery, distinguish “not executed” from “executed but the response was not received”.

Explore the execution architecture
07

Move from demonstration to operation.

A successful response is the beginning. Production integration also needs agreements on access, failures, artifacts and observability so the capability can keep working in your environment.

01

Access boundary

Keep credentials server-side. Separate environments and business permissions; control access to files and results.

Environment configuration · permission inventory
02

Task handling

Handle creation, polling, timeouts and terminal states. Retain the task ID so results can be revisited after a page closes.

State transitions · recovery flow
03

Failure handling

Separate invalid input from transient faults. Bound retries and avoid recreating tasks with side effects after an uncertain response.

Failure fixtures · retry strategy
04

Result acceptance

Validate formats, required fields and artifact access. Route design outputs into appropriate human and engineering review.

Acceptance rules · regression fixtures
05

Operations

Correlate request and task IDs. Observe queueing, execution and failures; agree retention and support procedures.

Correlated logs · operational records
Next

Start with one real task.

Explore the requests and results, then define your business objective, runtime and deliverables.

Illustrative contract version: illustrative-v1

鲁ICP备2024109755号-2
Drag to move. Right-click, touch and hold, or press Shift+F10 to choose a corner.