> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://respan.ai/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://respan.ai/docs/_mcp/server.

# Get a custom provider

GET https://api.respan.ai/api/providers/{provider_id}/

Retrieve a custom provider by its string provider ID. The current backend returns `extra_kwargs`, including any credentials stored in that object; handle this response as sensitive.

Reference: https://respan.ai/docs/apis/models/get-custom-provider

## Authentication

- `Authorization` header (bearer token, required) — Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer \<RESPAN\_API\_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan\_params.credential\_override in the request body, not in this authentication field.
- `Authorization` header (bearer token, required) — Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

## Request

### Path parameters

- `provider_id` (string, required) — Custom provider string ID returned as `id` and `provider_id` in provider responses.

## Response

### 200

Provider details.

- `id` (string, required) — Provider string ID. Same value as `provider_id`.
- `provider_id` (string, required) — Unique provider identifier within your organization.
- `provider_name` (string, required) — Human-readable provider name.
- `extra_kwargs` (map from string to any, optional) — Stored provider configuration. The current backend returns this object, including credentials it contains; handle the response as sensitive.
- `created_at` (datetime, optional, nullable)
- `updated_at` (datetime, optional, nullable)

## Errors

### 403 Forbidden Error

The API key is missing, invalid or expired.

- `detail` (string, required)

### 404 Not Found Error

Not Found

- `detail` (string, optional)
- `error` (string, optional)

## Examples

**Response**

```json
{
  "id": "my-vllm",
  "provider_id": "my-vllm",
  "provider_name": "My vLLM Server",
  "extra_kwargs": {
    "base_url": "https://vllm.example.com/v1"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.respan.ai/api/providers/provider_id/"

headers = {"Authorization": "Bearer <respanApiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.respan.ai/api/providers/provider_id/';
const options = {method: 'GET', headers: {Authorization: 'Bearer <respanApiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://api.respan.ai/api/providers/provider_id/"

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

	req.Header.Add("Authorization", "Bearer <respanApiKey>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.respan.ai/api/providers/provider_id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <respanApiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.respan.ai/api/providers/provider_id/")
  .header("Authorization", "Bearer <respanApiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.respan.ai/api/providers/provider_id/', [
  'headers' => [
    'Authorization' => 'Bearer <respanApiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.respan.ai/api/providers/provider_id/");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <respanApiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <respanApiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.respan.ai/api/providers/provider_id/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```