Skip to Content

Get a temporary API key

GEThttps://api.respan.ai/api/temporary-keys/{id}/

Servers

https://api.respan.ai: Respan API Server

Authentication

RespanApiKey

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.

HTTP scheme: bearer; format: Respan API key.

HTTP
Authorization: Bearer $RESPAN_API_KEY

Path parameters

Parameter Type Required Description and constraints
id string Required
The ID of the temporary API key to retrieve.

Responses

200

API key details.

application/json

Field Type Requirement Description and constraints
$ object Body
Additional properties are allowed
id string Optional
API key ID.
name string Optional
Key name.
prefix string Optional
Key prefix.
is_test boolean Optional
Test or production key.
expiry_date string Optional
Expiry date.
Format: date-time
max_usage integer Optional
Max usage count. -1 = unlimited.
rate_limit number or null Optional
Requests per minute. null uses the organization default.
spending_limit number or null Optional
Spending limit in USD. null when not set.
created string Optional
When the API key was created.
Format: date-time
unique_organization_id string or null Optional
Owning organization UUID.

OpenAPI response schema

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "API key ID."
    },
    "name": {
      "type": "string",
      "description": "Key name."
    },
    "prefix": {
      "type": "string",
      "description": "Key prefix."
    },
    "is_test": {
      "type": "boolean",
      "description": "Test or production key."
    },
    "expiry_date": {
      "type": "string",
      "format": "date-time",
      "description": "Expiry date."
    },
    "max_usage": {
      "type": "integer",
      "description": "Max usage count. -1 = unlimited."
    },
    "rate_limit": {
      "type": "number",
      "nullable": true,
      "description": "Requests per minute. null uses the organization default."
    },
    "spending_limit": {
      "type": "number",
      "description": "Spending limit in USD. `null` when not set.",
      "nullable": true
    },
    "created": {
      "type": "string",
      "format": "date-time",
      "description": "When the API key was created."
    },
    "unique_organization_id": {
      "type": "string",
      "nullable": true,
      "description": "Owning organization UUID."
    }
  },
  "additionalProperties": true
}

403

The API key is missing, invalid or expired.

application/json

Field Type Requirement Description and constraints
$ object Body
-
detail string Required in parent
-

OpenAPI response schema

{
  "type": "object",
  "required": [
    "detail"
  ],
  "properties": {
    "detail": {
      "type": "string"
    }
  }
}
Example
JSON
{ "detail": "Your API key is invalid or expired, please check your API key in the platform settings." }

404

Not Found

application/json

Field Type Requirement Description and constraints
$ object Body
-
error string Optional
Example: "Not found"

OpenAPI response schema

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "example": "Not found"
    }
  }
}

OpenAPI source

The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.

OpenAPI operation

{
  "summary": "Get a temporary API key",
  "operationId": "retrieveApiKey",
  "tags": [
    "Temporary API Keys"
  ],
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      },
      "description": "The ID of the temporary API key to retrieve."
    }
  ],
  "responses": {
    "200": {
      "description": "API key details.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "API key ID."
              },
              "name": {
                "type": "string",
                "description": "Key name."
              },
              "prefix": {
                "type": "string",
                "description": "Key prefix."
              },
              "is_test": {
                "type": "boolean",
                "description": "Test or production key."
              },
              "expiry_date": {
                "type": "string",
                "format": "date-time",
                "description": "Expiry date."
              },
              "max_usage": {
                "type": "integer",
                "description": "Max usage count. -1 = unlimited."
              },
              "rate_limit": {
                "type": "number",
                "nullable": true,
                "description": "Requests per minute. null uses the organization default."
              },
              "spending_limit": {
                "type": "number",
                "description": "Spending limit in USD. `null` when not set.",
                "nullable": true
              },
              "created": {
                "type": "string",
                "format": "date-time",
                "description": "When the API key was created."
              },
              "unique_organization_id": {
                "type": "string",
                "nullable": true,
                "description": "Owning organization UUID."
              }
            },
            "additionalProperties": true
          }
        }
      }
    },
    "403": {
      "$ref": "#/components/responses/InvalidApiKey"
    },
    "404": {
      "description": "Not Found",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "example": "Not found"
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "RespanApiKey": []
    }
  ]
}

OpenAPI path metadata

{}

Referenced OpenAPI components

{
  "responses": {
    "InvalidApiKey": {
      "description": "The API key is missing, invalid or expired.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "detail"
            ],
            "properties": {
              "detail": {
                "type": "string"
              }
            }
          },
          "example": {
            "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
          }
        }
      }
    }
  },
  "securitySchemes": {
    "RespanApiKey": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Respan API key",
      "description": "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.",
      "x-fern-bearer": {
        "name": "respanApiKey",
        "env": "RESPAN_API_KEY"
      }
    }
  }
}