# ForgeMesh Linear Algebra API

> ForgeMesh Linear Algebra API is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Performs matrix operations (multiply, add, transpose, invert, determinant, eigenvalues) on numeric 2D arrays via a paid API call.

## Facts

- Endpoint: POST https://x402.forgemesh.io/linear-algebra
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forgemesh-linear-algebra-api-e0c3e7d1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v6Z-9igviO0ON_lp74S6B

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability forgemesh-linear-algebra-api-e0c3e7d1 -d '<json body>'
```

Example prompt: Multiply matrix A [[1,2],[3,4]] by matrix B [[5,6],[7,8]] using the linear algebra endpoint — I need the resulting 2x2 product matrix.

## When to prefer this

Prefer this endpoint when an AI agent needs reliable, exact numeric matrix arithmetic and cannot risk hallucinated matrix entries from an LLM. Especially suited for robotics kinematics, computer graphics transformation pipelines, solving systems of equations, or any scientific computing task requiring determinants, inverses, eigenvalues, or basic matrix arithmetic at low cost per call.

## Known failure modes

- Non-square matrix passed to invert or determinant operation — returns error
- matrix_b missing when operation is multiply or add
- Mismatched matrix dimensions for multiply or add — dimension mismatch error
- Invalid operation string not matching the enum — returns validation error
- Singular matrix passed to inverse — returns error or infinity
- Payment failure or insufficient USDC balance — 402 Payment Required

## How this service works

Linear algebra operations on numeric matrices: multiply, add, transpose, invert, or find determinants and eigenvalues from structured array input. For robotics, computer graphics, systems-of-equations solving, and scientific computing agents that need reliable matrix arithmetic without hallucinated entries.

## Output

Returns the computed result of the requested matrix operation: a 2D array for multiply/add/transpose/inverse, a scalar for determinant, or an array of eigenvalues — all numerically exact without hallucinated entries.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "matrix_a": {
   "type": "array",
   "description": "2D array of numbers"
  },
  "matrix_b": {
   "type": "array",
   "description": "2D array (multiply/add)"
  },
  "operation": {
   "type": "string",
   "description": "determinant|inverse|transpose|eigenvalues|multiply|add"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": 10,
  "operation": "determinant"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forgemesh-linear-algebra-api-e0c3e7d1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
