---
title: "Redeem a code for credit, a discount, or both."
method: POST
path: "/v1/credits/redeem"
tags: ["credits"]
---

# Redeem a code for credit, a discount, or both.

`POST /v1/credits/redeem`

## Request

- Base URL: `https://api.japanfold.aiand.com`
- URL: `https://api.japanfold.aiand.com/v1/credits/redeem`
- Auth: one of:
  - none
  - HTTP bearer

Send `{"code": "JF-XXXX-XXXX-XXXX-XXXX"}`. A code works once per account. Returns the `entry` it posted and the account's balance and `rate` after it; a discount applies to runs charged from then on, never to one already charged.

## Request body

- object
  - `code` string, required

## Response `201`

Redeemed

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `409`: Conflict
- `429`: Over a rate limit, or the queue is too busy to admit this in time

---

[API](https://skmtc.dev/aiand/apis/japanfold-api.md) · [All operations](https://skmtc.dev/aiand/apis/japanfold-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aiand/apis/japanfold-api/revisions/9f4be813b447?raw)
