Before You Start
- Prerequisites and rate limits: See the Usage Export API overview.
- Browser requests: Langdock intentionally blocks browser-origin requests to protect your API key. Use API keys server-side and store them securely. See API Key Best Practices.
Base URL
Request
A
from earlier than 366 days ago is treated as 366 days ago, and a to in the future is treated as now. If to is before from, the API returns 400 Bad Request.
Paging
Rows are oldest first.next_cursor is null on the last page. When it is a string, send it as cursor with the same from and to. An invalid cursor returns 400 Bad Request. An empty window returns 200 with data: [] and next_cursor: null.
When Rows Appear
For requests sent to the Model Gateway ongateway.langdock.com, id matches the x-request-id response header from that completion call. An x-request-id you send in the request does not become id. The row appears a few seconds later, once the cost is settled. Rows from the Completion API on api.langdock.com appear when the request finishes.