> ## Documentation Index
> Fetch the complete documentation index at: https://docs.turtle.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# API Explorer

> Browse and try the Turtle Earn API against its OpenAPI specification.

The Turtle Earn API publishes a machine-readable OpenAPI 3.1 specification. Use it to browse every public endpoint, generate a typed client, or drive an interactive playground.

**Spec URL:** `https://earn.turtle.xyz/docs/openapi.json`

## Browse the endpoints

The hosted Swagger UI lists every public endpoint with its parameters, request bodies, and response schemas:

* **Swagger UI:** [earn.turtle.xyz/docs](https://earn.turtle.xyz/docs)

The endpoints documented in this section (Authentication, Opportunities, Earn, Portfolio & Activity, Streams) are the partner-facing surface of that spec.

## Import into a client

Point any OpenAPI-aware tool at the spec URL:

* **Postman or Insomnia:** import by URL for an interactive collection.
* **Swagger UI or Redoc, locally:** load the spec URL to browse offline.

## Generate a typed client

<CodeGroup>
  ```bash TypeScript theme={null}
  npx @openapitools/openapi-generator-cli generate \
    -i https://earn.turtle.xyz/docs/openapi.json \
    -g typescript-fetch \
    -o ./turtle-client
  ```

  ```bash Python theme={null}
  openapi-generator-cli generate \
    -i https://earn.turtle.xyz/docs/openapi.json \
    -g python \
    -o ./turtle-client
  ```
</CodeGroup>

After generating, configure the client with your `X-API-Key` header. See [API Keys](/sdk/authentication/api-keys).

<Note>
  The spec is generated from the live API and reflects only the public endpoints. For the raw URL and more client-generation detail, see [OpenAPI Spec](/sdk/reference/openapi-spec).
</Note>
