## GET /v1/account/usage

Read usage for a UTC calendar month, split by billing source.

Required permissions: read:account.
API key: Supported.
CLI user token: Supported.
Session token: Requires the ellipsis:api scope, and the session's permissions.ellipsis rules must allow the operation.
Higher permission levels include lower levels: read < write < delete.

### Response

```text
{
  "agent_sessions": {
    "cost": {
      "charged": int,
      "cpu": int,
      "fee": int,
      "llm": {
        "all": {
          "claude_subscription": int,
          "codex_subscription": int,
          "platform": int,
          "total": int
        },
        "by_model": [
          {
            "claude_subscription": int,
            "codex_subscription": int,
            "model": str,
            "platform": int,
            "total": int
          }
        ]
      },
      "memory": int,
      "total": int
    },
    "tokens": {
      "all": {
        "cache_creation": int,
        "cache_read": int,
        "input": int,
        "output": int,
        "total": int
      },
      "by_model": [
        {
          "cache_creation": int,
          "cache_read": int,
          "input": int,
          "model": str,
          "output": int,
          "total": int
        }
      ]
    }
  },
  "billing_periods": [
    {
      "is_current": bool,
      "period_end": str,
      "period_start": str
    }
  ],
  "by_billing_source": [
    {
      "billing_source": str,
      "charged": int,
      "pending_requests": int,
      "requests": int,
      "token_charged": int,
      "token_cost": int,
      "tokens": int,
      "unresolved_requests": int
    }
  ],
  "by_day": [
    {
      "cost": {
        "charged": int,
        "cpu": int,
        "fee": int,
        "llm": {
          "all": {
            "claude_subscription": int,
            "codex_subscription": int,
            "platform": int,
            "total": int
          },
          "by_model": [
            {
              "claude_subscription": int,
              "codex_subscription": int,
              "model": str,
              "platform": int,
              "total": int
            }
          ]
        },
        "memory": int,
        "total": int
      },
      "date": str,
      "tokens": {
        "all": {
          "cache_creation": int,
          "cache_read": int,
          "input": int,
          "output": int,
          "total": int
        },
        "by_model": [
          {
            "cache_creation": int,
            "cache_read": int,
            "input": int,
            "model": str,
            "output": int,
            "total": int
          }
        ]
      }
    }
  ],
  "by_developer": [
    {
      "attribution_id": str,
      "attribution_login": str,
      "attribution_type": str,
      "cost": {
        "charged": int,
        "cpu": int,
        "fee": int,
        "llm": {
          "all": {
            "claude_subscription": int,
            "codex_subscription": int,
            "platform": int,
            "total": int
          },
          "by_model": [
            {
              "claude_subscription": int,
              "codex_subscription": int,
              "model": str,
              "platform": int,
              "total": int
            }
          ]
        },
        "memory": int,
        "total": int
      },
      "runs": int,
      "tokens": {
        "all": {
          "cache_creation": int,
          "cache_read": int,
          "input": int,
          "output": int,
          "total": int
        },
        "by_model": [
          {
            "cache_creation": int,
            "cache_read": int,
            "input": int,
            "model": str,
            "output": int,
            "total": int
          }
        ]
      }
    }
  ],
  "cost": {
    "charged": int,
    "cpu": int,
    "fee": int,
    "llm": {
      "all": {
        "claude_subscription": int,
        "codex_subscription": int,
        "platform": int,
        "total": int
      },
      "by_model": [
        {
          "claude_subscription": int,
          "codex_subscription": int,
          "model": str,
          "platform": int,
          "total": int
        }
      ]
    },
    "memory": int,
    "total": int
  },
  "period_end": str,
  "period_start": str,
  "prior_cost": {
    "charged": int,
    "cpu": int,
    "fee": int,
    "llm": {
      "all": {
        "claude_subscription": int,
        "codex_subscription": int,
        "platform": int,
        "total": int
      },
      "by_model": [
        {
          "claude_subscription": int,
          "codex_subscription": int,
          "model": str,
          "platform": int,
          "total": int
        }
      ]
    },
    "memory": int,
    "total": int
  },
  "prior_tokens": {
    "all": {
      "cache_creation": int,
      "cache_read": int,
      "input": int,
      "output": int,
      "total": int
    },
    "by_model": [
      {
        "cache_creation": int,
        "cache_read": int,
        "input": int,
        "model": str,
        "output": int,
        "total": int
      }
    ]
  },
  "tokens": {
    "all": {
      "cache_creation": int,
      "cache_read": int,
      "input": int,
      "output": int,
      "total": int
    },
    "by_model": [
      {
        "cache_creation": int,
        "cache_read": int,
        "input": int,
        "model": str,
        "output": int,
        "total": int
      }
    ]
  }
}
```

### Python

```python
import os

from ellipsis import Ellipsis

client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])

result = client.account.usage()
print(result)
```

### TypeScript

```typescript
import { Ellipsis } from '@ellipsis-dev/sdk';

const client = new Ellipsis({
  apiKey: process.env.ELLIPSIS_API_TOKEN!,
});

const result = await client.account.usage();
console.log(result);
```

### cURL

```bash
curl "https://api.ellipsis.dev/v1/account/usage" \
  -H "Authorization: Bearer $ELLIPSIS_API_TOKEN"
```

### Response schema

```json
{
  "properties": {
    "agent_sessions": {
      "properties": {
        "cost": {
          "properties": {
            "charged": {
              "default": 0,
              "type": "integer"
            },
            "cpu": {
              "default": 0,
              "type": "integer"
            },
            "fee": {
              "default": 0,
              "type": "integer"
            },
            "llm": {
              "properties": {
                "all": {
                  "properties": {
                    "claude_subscription": {
                      "default": 0,
                      "type": "integer"
                    },
                    "codex_subscription": {
                      "default": 0,
                      "type": "integer"
                    },
                    "platform": {
                      "default": 0,
                      "type": "integer"
                    },
                    "total": {
                      "default": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "claude_subscription",
                    "codex_subscription",
                    "platform",
                    "total"
                  ],
                  "type": "object"
                },
                "by_model": {
                  "items": {
                    "properties": {
                      "claude_subscription": {
                        "type": "integer"
                      },
                      "codex_subscription": {
                        "type": "integer"
                      },
                      "model": {
                        "type": "string"
                      },
                      "platform": {
                        "type": "integer"
                      },
                      "total": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "claude_subscription",
                      "codex_subscription",
                      "model",
                      "platform",
                      "total"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "all",
                "by_model"
              ],
              "type": "object"
            },
            "memory": {
              "default": 0,
              "type": "integer"
            },
            "total": {
              "default": 0,
              "type": "integer"
            }
          },
          "required": [
            "charged",
            "cpu",
            "fee",
            "llm",
            "memory",
            "total"
          ],
          "type": "object"
        },
        "tokens": {
          "properties": {
            "all": {
              "properties": {
                "cache_creation": {
                  "default": 0,
                  "type": "integer"
                },
                "cache_read": {
                  "default": 0,
                  "type": "integer"
                },
                "input": {
                  "default": 0,
                  "type": "integer"
                },
                "output": {
                  "default": 0,
                  "type": "integer"
                },
                "total": {
                  "default": 0,
                  "type": "integer"
                }
              },
              "required": [
                "cache_creation",
                "cache_read",
                "input",
                "output",
                "total"
              ],
              "type": "object"
            },
            "by_model": {
              "items": {
                "properties": {
                  "cache_creation": {
                    "default": 0,
                    "type": "integer"
                  },
                  "cache_read": {
                    "default": 0,
                    "type": "integer"
                  },
                  "input": {
                    "default": 0,
                    "type": "integer"
                  },
                  "model": {
                    "type": "string"
                  },
                  "output": {
                    "default": 0,
                    "type": "integer"
                  },
                  "total": {
                    "default": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "cache_creation",
                  "cache_read",
                  "input",
                  "model",
                  "output",
                  "total"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "all",
            "by_model"
          ],
          "type": "object"
        }
      },
      "required": [
        "cost",
        "tokens"
      ],
      "type": "object"
    },
    "billing_periods": {
      "items": {
        "properties": {
          "is_current": {
            "type": "boolean"
          },
          "period_end": {
            "type": "string"
          },
          "period_start": {
            "type": "string"
          }
        },
        "required": [
          "period_start",
          "period_end",
          "is_current"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "by_billing_source": {
      "items": {
        "properties": {
          "billing_source": {
            "enum": [
              "platform",
              "claude_subscription",
              "codex_subscription",
              "unknown"
            ],
            "type": "string"
          },
          "charged": {
            "default": 0,
            "type": "integer"
          },
          "pending_requests": {
            "default": 0,
            "type": "integer"
          },
          "requests": {
            "default": 0,
            "type": "integer"
          },
          "token_charged": {
            "default": 0,
            "type": "integer"
          },
          "token_cost": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "tokens": {
            "default": 0,
            "type": "integer"
          },
          "unresolved_requests": {
            "default": 0,
            "type": "integer"
          }
        },
        "required": [
          "billing_source"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "by_day": {
      "items": {
        "properties": {
          "cost": {
            "properties": {
              "charged": {
                "default": 0,
                "type": "integer"
              },
              "cpu": {
                "default": 0,
                "type": "integer"
              },
              "fee": {
                "default": 0,
                "type": "integer"
              },
              "llm": {
                "properties": {
                  "all": {
                    "properties": {
                      "claude_subscription": {
                        "type": "integer"
                      },
                      "codex_subscription": {
                        "type": "integer"
                      },
                      "platform": {
                        "type": "integer"
                      },
                      "total": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "claude_subscription",
                      "codex_subscription",
                      "platform",
                      "total"
                    ],
                    "type": "object"
                  },
                  "by_model": {
                    "items": {
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "all",
                  "by_model"
                ],
                "type": "object"
              },
              "memory": {
                "default": 0,
                "type": "integer"
              },
              "total": {
                "default": 0,
                "type": "integer"
              }
            },
            "required": [
              "charged",
              "cpu",
              "fee",
              "llm",
              "memory",
              "total"
            ],
            "type": "object"
          },
          "date": {
            "type": "string"
          },
          "tokens": {
            "properties": {
              "all": {
                "properties": {
                  "cache_creation": {
                    "default": 0,
                    "type": "integer"
                  },
                  "cache_read": {
                    "default": 0,
                    "type": "integer"
                  },
                  "input": {
                    "default": 0,
                    "type": "integer"
                  },
                  "output": {
                    "default": 0,
                    "type": "integer"
                  },
                  "total": {
                    "default": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "cache_creation",
                  "cache_read",
                  "input",
                  "output",
                  "total"
                ],
                "type": "object"
              },
              "by_model": {
                "items": {
                  "properties": {
                    "cache_creation": {
                      "type": "integer"
                    },
                    "cache_read": {
                      "type": "integer"
                    },
                    "input": {
                      "type": "integer"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "cache_creation",
                    "cache_read",
                    "input",
                    "model",
                    "output",
                    "total"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "all",
              "by_model"
            ],
            "type": "object"
          }
        },
        "required": [
          "date",
          "cost",
          "tokens"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "by_developer": {
      "items": {
        "properties": {
          "attribution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attribution_login": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attribution_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost": {
            "properties": {
              "charged": {
                "default": 0,
                "type": "integer"
              },
              "cpu": {
                "default": 0,
                "type": "integer"
              },
              "fee": {
                "default": 0,
                "type": "integer"
              },
              "llm": {
                "properties": {
                  "all": {
                    "properties": {
                      "claude_subscription": {
                        "type": "integer"
                      },
                      "codex_subscription": {
                        "type": "integer"
                      },
                      "platform": {
                        "type": "integer"
                      },
                      "total": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "claude_subscription",
                      "codex_subscription",
                      "platform",
                      "total"
                    ],
                    "type": "object"
                  },
                  "by_model": {
                    "items": {
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "all",
                  "by_model"
                ],
                "type": "object"
              },
              "memory": {
                "default": 0,
                "type": "integer"
              },
              "total": {
                "default": 0,
                "type": "integer"
              }
            },
            "required": [
              "charged",
              "cpu",
              "fee",
              "llm",
              "memory",
              "total"
            ],
            "type": "object"
          },
          "runs": {
            "type": "integer"
          },
          "tokens": {
            "properties": {
              "all": {
                "properties": {
                  "cache_creation": {
                    "default": 0,
                    "type": "integer"
                  },
                  "cache_read": {
                    "default": 0,
                    "type": "integer"
                  },
                  "input": {
                    "default": 0,
                    "type": "integer"
                  },
                  "output": {
                    "default": 0,
                    "type": "integer"
                  },
                  "total": {
                    "default": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "cache_creation",
                  "cache_read",
                  "input",
                  "output",
                  "total"
                ],
                "type": "object"
              },
              "by_model": {
                "items": {
                  "properties": {
                    "cache_creation": {
                      "type": "integer"
                    },
                    "cache_read": {
                      "type": "integer"
                    },
                    "input": {
                      "type": "integer"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "cache_creation",
                    "cache_read",
                    "input",
                    "model",
                    "output",
                    "total"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "all",
              "by_model"
            ],
            "type": "object"
          }
        },
        "required": [
          "attribution_type",
          "attribution_id",
          "attribution_login",
          "runs",
          "cost",
          "tokens"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "cost": {
      "properties": {
        "charged": {
          "default": 0,
          "type": "integer"
        },
        "cpu": {
          "default": 0,
          "type": "integer"
        },
        "fee": {
          "default": 0,
          "type": "integer"
        },
        "llm": {
          "properties": {
            "all": {
              "properties": {
                "claude_subscription": {
                  "default": 0,
                  "type": "integer"
                },
                "codex_subscription": {
                  "default": 0,
                  "type": "integer"
                },
                "platform": {
                  "default": 0,
                  "type": "integer"
                },
                "total": {
                  "default": 0,
                  "type": "integer"
                }
              },
              "required": [
                "claude_subscription",
                "codex_subscription",
                "platform",
                "total"
              ],
              "type": "object"
            },
            "by_model": {
              "items": {
                "properties": {
                  "claude_subscription": {
                    "default": 0,
                    "type": "integer"
                  },
                  "codex_subscription": {
                    "default": 0,
                    "type": "integer"
                  },
                  "model": {
                    "type": "string"
                  },
                  "platform": {
                    "default": 0,
                    "type": "integer"
                  },
                  "total": {
                    "default": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "claude_subscription",
                  "codex_subscription",
                  "model",
                  "platform",
                  "total"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "all",
            "by_model"
          ],
          "type": "object"
        },
        "memory": {
          "default": 0,
          "type": "integer"
        },
        "total": {
          "default": 0,
          "type": "integer"
        }
      },
      "required": [
        "charged",
        "cpu",
        "fee",
        "llm",
        "memory",
        "total"
      ],
      "type": "object"
    },
    "period_end": {
      "type": "string"
    },
    "period_start": {
      "type": "string"
    },
    "prior_cost": {
      "properties": {
        "charged": {
          "default": 0,
          "type": "integer"
        },
        "cpu": {
          "default": 0,
          "type": "integer"
        },
        "fee": {
          "default": 0,
          "type": "integer"
        },
        "llm": {
          "properties": {
            "all": {
              "properties": {
                "claude_subscription": {
                  "default": 0,
                  "type": "integer"
                },
                "codex_subscription": {
                  "default": 0,
                  "type": "integer"
                },
                "platform": {
                  "default": 0,
                  "type": "integer"
                },
                "total": {
                  "default": 0,
                  "type": "integer"
                }
              },
              "required": [
                "claude_subscription",
                "codex_subscription",
                "platform",
                "total"
              ],
              "type": "object"
            },
            "by_model": {
              "items": {
                "properties": {
                  "claude_subscription": {
                    "default": 0,
                    "type": "integer"
                  },
                  "codex_subscription": {
                    "default": 0,
                    "type": "integer"
                  },
                  "model": {
                    "type": "string"
                  },
                  "platform": {
                    "default": 0,
                    "type": "integer"
                  },
                  "total": {
                    "default": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "claude_subscription",
                  "codex_subscription",
                  "model",
                  "platform",
                  "total"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "all",
            "by_model"
          ],
          "type": "object"
        },
        "memory": {
          "default": 0,
          "type": "integer"
        },
        "total": {
          "default": 0,
          "type": "integer"
        }
      },
      "required": [
        "charged",
        "cpu",
        "fee",
        "llm",
        "memory",
        "total"
      ],
      "type": "object"
    },
    "prior_tokens": {
      "properties": {
        "all": {
          "properties": {
            "cache_creation": {
              "default": 0,
              "type": "integer"
            },
            "cache_read": {
              "default": 0,
              "type": "integer"
            },
            "input": {
              "default": 0,
              "type": "integer"
            },
            "output": {
              "default": 0,
              "type": "integer"
            },
            "total": {
              "default": 0,
              "type": "integer"
            }
          },
          "required": [
            "cache_creation",
            "cache_read",
            "input",
            "output",
            "total"
          ],
          "type": "object"
        },
        "by_model": {
          "items": {
            "properties": {
              "cache_creation": {
                "default": 0,
                "type": "integer"
              },
              "cache_read": {
                "default": 0,
                "type": "integer"
              },
              "input": {
                "default": 0,
                "type": "integer"
              },
              "model": {
                "type": "string"
              },
              "output": {
                "default": 0,
                "type": "integer"
              },
              "total": {
                "default": 0,
                "type": "integer"
              }
            },
            "required": [
              "cache_creation",
              "cache_read",
              "input",
              "model",
              "output",
              "total"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "all",
        "by_model"
      ],
      "type": "object"
    },
    "tokens": {
      "properties": {
        "all": {
          "properties": {
            "cache_creation": {
              "default": 0,
              "type": "integer"
            },
            "cache_read": {
              "default": 0,
              "type": "integer"
            },
            "input": {
              "default": 0,
              "type": "integer"
            },
            "output": {
              "default": 0,
              "type": "integer"
            },
            "total": {
              "default": 0,
              "type": "integer"
            }
          },
          "required": [
            "cache_creation",
            "cache_read",
            "input",
            "output",
            "total"
          ],
          "type": "object"
        },
        "by_model": {
          "items": {
            "properties": {
              "cache_creation": {
                "default": 0,
                "type": "integer"
              },
              "cache_read": {
                "default": 0,
                "type": "integer"
              },
              "input": {
                "default": 0,
                "type": "integer"
              },
              "model": {
                "type": "string"
              },
              "output": {
                "default": 0,
                "type": "integer"
              },
              "total": {
                "default": 0,
                "type": "integer"
              }
            },
            "required": [
              "cache_creation",
              "cache_read",
              "input",
              "model",
              "output",
              "total"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "all",
        "by_model"
      ],
      "type": "object"
    }
  },
  "required": [
    "billing_periods",
    "period_start",
    "period_end",
    "cost",
    "tokens",
    "prior_cost",
    "prior_tokens",
    "by_day",
    "agent_sessions",
    "by_developer"
  ],
  "type": "object"
}
```
