# Test a vendor key before saving it (/docs/api/access/credentials_verify)

Call the provider's free, read-only test endpoint with a key that is not stored yet. Nothing is saved; the key is used for this one call. Never charged; the call is logged.

`POST /v1/credentials/{provider}/verify`

```json
{
  "operationId": "credentials_verify",
  "summary": "Test a vendor key before saving it",
  "description": "Call the provider's free, read-only test endpoint with a key that is not stored yet. Nothing is saved; the key is used for this one call. Never charged; the call is logged.",
  "tags": [
    "credentials"
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "schema": {
        "type": "string",
        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
      },
      "required": true,
      "name": "provider",
      "in": "path"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "fields": {
              "type": "object",
              "additionalProperties": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              }
            }
          },
          "required": [
            "fields"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "enum": [
                  "credential_test"
                ]
              },
              "provider": {
                "type": "string"
              },
              "slot": {
                "type": "string",
                "enum": [
                  "primary",
                  "fallback"
                ]
              },
              "ok": {
                "type": "boolean"
              },
              "endpoint_id": {
                "type": "string"
              },
              "call_id": {
                "type": "string"
              },
              "latency_ms": {
                "type": "integer",
                "minimum": 0
              },
              "message": {
                "type": "string"
              },
              "data": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "object",
              "provider",
              "ok",
              "endpoint_id",
              "latency_ms",
              "message"
            ]
          }
        }
      }
    },
    "default": {
      "description": "Error",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "invalid_request",
                      "unauthorized",
                      "insufficient_balance",
                      "max_cost_exceeded",
                      "scope_denied",
                      "budget_blocked",
                      "not_found",
                      "idempotency_mismatch",
                      "invalid_meta",
                      "rate_limited",
                      "upstream_error",
                      "response_buffer_limit",
                      "provider_capacity_unavailable",
                      "grid_saturated",
                      "upstream_timeout",
                      "conflict",
                      "internal_error",
                      "account_frozen",
                      "strict_filters",
                      "plan_limit_reached",
                      "validation_failed",
                      "deadline_exceeded",
                      "cancelled"
                    ]
                  },
                  "message": {
                    "type": "string"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "call_id": {
                    "type": "string"
                  },
                  "retry_after_ms": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "details": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              }
            },
            "required": [
              "error"
            ]
          }
        }
      }
    }
  }
}
```
