# Femtos | AI job stream | API reference

> A Femtos AI job of your account as it runs: the answer as it is written, each data call, then the answer. WebSocket channel ai.job on Elysium and HyperCore: parameters, response fields and a live call per layer.

- Base URL: `https://api.femtos.xyz/v1` (REST) · `wss://api.femtos.xyz/v1/ws` (WebSocket) · MCP: `https://api.femtos.xyz/mcp`
- Auth: `Authorization: Bearer $FEMTOS_KEY`. Free key: https://dashboard.femtos.xyz/signup (browser), or with
  no browser: `GET https://femtos.xyz/accounts/agent/challenge`, solve its proof of work, then `POST https://femtos.xyz/accounts/agent/signup`
  (https://femtos.xyz/agents.md#agent-onboarding)
- Decimals are exact strings, times Unix milliseconds, addresses lowercase `0x`
- Whole API in one file: https://femtos.xyz/agents.md · OpenAPI: https://api.femtos.xyz/v1/openapi.json · Index: https://femtos.xyz/llms.txt
- Page with live calls: https://femtos.xyz/reference/ws/ai-job

WebSocket: get a ticket (`POST https://api.femtos.xyz/v1/ws-ticket` with your key), connect to `wss://api.femtos.xyz/v1/ws?ticket=$TICKET`, send the frame below; the first message has `"snapshot": true`. Details: https://femtos.xyz/agents.md#websocket

## AI job stream — WS `ai.job`

A Femtos AI job of your account as it runs: the answer as it is written, each data call, then the answer.

Layers: Elysium, HyperCore. No data on Elysium yet: a job of your own account: POST /v1/ai/jobs first. No data on HyperCore yet: a job of your own account: POST /v1/ai/jobs first.
Page with live calls: https://femtos.xyz/reference/ws/ai-job?layer=<elysium|hypercore>

| Param | In | Example or values | Meaning |
|---|---|---|---|
| `id` | filter | (optional) | A job id of your account (POST /v1/ai/jobs) |

Elysium, HyperCore:

```json
{"op":"subscribe","channel":"ai.job","filter":{}}
```

| Field | Type | Meaning |
|---|---|---|
| `snapshot: true` | AiJob | the job as it is at subscribe (GET /v1/ai/jobs/{id}) |
| `data` | AiJobEvent | each event of the job until its end: delta (text), tool (a data call), then done or failed: {type, content, tool, args, ok, request, result, error} |

## Related (AI)

- [AI models and prices](https://femtos.xyz/reference/ai-models.md) `GET /v1/ai/models`: The models Femtos AI answers with, and the USD price per million tokens of each (OpenRouter's x 1.25). (Elysium, HyperCore)

Every page: https://femtos.xyz/reference.md
