Retry behavior

Configure retry behavior for endpoints using x-fern-retries extension

The x-fern-retries extension is supported in Python SDKs only.

The x-fern-retries extension configures retry behavior per endpoint in your OpenAPI specification, overriding any retry settings configured by SDK users. Use it to disable retries for non-idempotent operations like payment processing or order creation.

To disable retries for specific endpoints, set disabled: true.

openapi.yml
1paths:
2 /plants/{plantId}:
3 get:
4 x-fern-retries:
5 disabled: true
6 operationId: get_plant
7 parameters:
8 - name: plantId
9 in: path
10 required: true
11 schema:
12 type: string
13 /plants:
14 post:
15 x-fern-retries:
16 disabled: true
17 operationId: create_plant
18 requestBody:
19 required: true
20 content:
21 application/json:
22 schema:
23 type: object
24 properties:
25 name:
26 type: string
27 species:
28 type: string
29 responses:
30 '201':
31 description: Plant created successfully

When retries are disabled at the endpoint level, the generated SDK won’t retry failed requests to that endpoint, regardless of the SDK’s user custom configuration.