# /v1/spec

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/spec

Provides a web-based UI for exploring the Aptos REST API.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-spec

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/spec
```

### JavaScript

```javascript
const options = {method: 'GET'};

fetch('https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/spec', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/spec"

response = requests.get(url)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/spec"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.get("https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/spec")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/spec");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /v1/spec
method: GET
operation:
  summary: /v1/spec
  description: |
    Provides a web-based UI for exploring the Aptos REST API.
  tags:
    - Aptos API Endpoints
  security:
    - apiKey: []
  responses:
    '200':
      description: HTML page with interactive API documentation.
      content:
        text/html:
          schema:
            type: string
          examples:
            response:
              summary: HTML response sample (truncated)
              value: |
                <!doctype html>
                <html lang="en">
                <head>
                  <meta charset="utf-8">
                  <title>Aptos REST API</title>
                  <script src="https://unpkg.com/@stoplight/elements/web-components.min.js"></script>
                  <link rel="stylesheet" href="https://unpkg.com/@stoplight/elements/styles.min.css">
                </head>
                <body>
                  <elements-api apiDescriptionUrl="spec.yaml" router="hash" layout="sidebar" hideInternal="true" />
                </body>
                </html>
```
