corehu
Developers

Manage GPUs with the REST API

Read offers, rent GPUs and manage your machines from your own code with the REST API. With MCP your AI assistant finds prices and, only with your approval, rents and manages the machines you choose.

  • Use a Bearer ck_ API key for account operations; cmcp_ grants selected machines read-only MCP access for 30 days.
  • Create a quote with offerId, then a reservation with its quoteId.
  • Only reservation creation requires Idempotency-Key: reuse the same key and request for a retry, and use a new key for a new reservation. Other endpoint examples do not promise idempotency.

Domain errors use {error, message}; also inspect HTTP status. Customer webhook delivery is not released.

API endpoints →
Authentication
curl -X GET "https://apigpu.corehu.com/api/v1/offers" \
  -H "Authorization: Bearer $COREHU_API_KEY"
Usage
curl -X POST "https://apigpu.corehu.com/api/quotes" \
  -H "Authorization: Bearer $COREHU_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"offerId":"<offer-id>"}'

curl -X POST "https://apigpu.corehu.com/api/reservations" \
  -H "Authorization: Bearer $COREHU_API_KEY" \
  -H "Idempotency-Key: <unique-operation-id>" \
  -H "Content-Type: application/json" \
  --data '{"quoteId":"<quote-id>"}'

Quote → reservation flow

  1. POST /api/quotes returns a quote. Put its id field into the quoteId field of the next request; a reservation cannot be created without a quote.
  2. These are two separate requests, not a one-command automatic rental. The reservation holds the amount and the machine is opened afterwards; track it with GET /api/reservations/<reservation-id> (rentalId and rentalState).
  3. When retrying the same purchase, send the same Idempotency-Key with the same body; the first result is returned. The same key with a different body gets 409 IDEMPOTENCY_CONFLICT. Use a new key for a new purchase.
  4. A quote is valid until the expiresAt in its response and for a single reservation. After that the reservation returns 410 QUOTE_EXPIRED; request a new quote.
  5. The reservation holds the quote's holdAmountMinor from your available balance (or approved credit account). If it is not enough, it returns 409 INSUFFICIENT_CREDIT.
  6. If purchase verification is enabled, reservations return 403 (AUTH_PURCHASE_VERIFICATION_REQUIRED) until your email is verified. Phone verification is optional. Verification page

Values in angle brackets such as <offer-id>, <quote-id> and <unique-operation-id> are placeholders; the API guide explains where each one comes from. API guide