{"openapi":"3.1.0","info":{"title":"xAI (BYOK) API","version":"0.1.0","description":"xAI (BYOK) lets an AI assistant read your own xAI data through the xAI API with a key you supply (xAI API key). Read-only: 11 tools (get_api_key_info, get_caller_identity, list_models, get_model, list_language_models, list_embedding_models, list_image_generation_models, list_video_generation_models, list_files, get_file_metadata, list_skills). The BYOK key travels with each request, is used for...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-xai.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-xai/docs"},"termsOfService":"https://connectorbay.com/byok-xai/terms"},"servers":[{"url":"https://byok-xai.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-xai/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_api_key_info":{"post":{"operationId":"get_api_key_info","summary":"Show the API key in use: its name, redacted form, permissions (acls), blocked or disabled state, team id and creation an","description":"Show the API key in use: its name, redacted form, permissions (acls), blocked or disabled state, team id and creation and modification times. Never returns the full key. Use for \"What permissions does my xAI API key have and is it disabled\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_api_key_infoArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_caller_identity":{"post":{"operationId":"get_caller_identity","summary":"Show who the key authenticates as: team id, user id, whether the team is blocked, zero data retention status and the key","description":"Show who the key authenticates as: team id, user id, whether the team is blocked, zero data retention status and the key's id and state. Use for \"Which xAI team and user does this key belong to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_caller_identityArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_models":{"post":{"operationId":"list_models","summary":"List every model the key can use with id, aliases, context length and token prices (prices are integers in xAI's own uni","description":"List every model the key can use with id, aliases, context length and token prices (prices are integers in xAI's own units). Use for \"Which Grok models can my xAI key use and what do they cost\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_modelsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_model":{"post":{"operationId":"get_model","summary":"Get one model's id, aliases, context length, token prices and supported reasoning effort levels. Use for \"What is the co","description":"Get one model's id, aliases, context length, token prices and supported reasoning effort levels. Use for \"What is the context length and price of grok-4\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"model_id":{"description":"Model identifier or alias as listed by the model tools, for example 'grok-4'.","maxLength":200,"title":"Model Id","type":"string"}},"required":["model_id"],"title":"get_modelArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_language_models":{"post":{"operationId":"list_language_models","summary":"List chat and image-understanding models with modalities, token prices, search price and long-context threshold. Use for","description":"List chat and image-understanding models with modalities, token prices, search price and long-context threshold. Use for \"Which xAI language models accept image input\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_language_modelsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_embedding_models":{"post":{"operationId":"list_embedding_models","summary":"List embedding models available to the key with modalities and token prices. Use for \"Which embedding models does xAI of","description":"List embedding models available to the key with modalities and token prices. Use for \"Which embedding models does xAI offer my key\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_embedding_modelsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_image_generation_models":{"post":{"operationId":"list_image_generation_models","summary":"List image generation models available to the key with maximum prompt length and prices. Only lists models; it does not ","description":"List image generation models available to the key with maximum prompt length and prices. Only lists models; it does not generate images. Use for \"Which xAI image generation models can I use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_image_generation_modelsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_video_generation_models":{"post":{"operationId":"list_video_generation_models","summary":"List video generation models available to the key. Only lists models; it does not generate video. Use for \"Which xAI vid","description":"List video generation models available to the key. Only lists models; it does not generate video. Use for \"Which xAI video generation models are available\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_video_generation_modelsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_files":{"post":{"operationId":"list_files","summary":"List files uploaded by your team with name, size, purpose and expiry. Pass pagination_token from the previous answer for","description":"List files uploaded by your team with name, size, purpose and expiry. Pass pagination_token from the previous answer for the next page; the end is reached when fewer than limit files come back. Use for \"Which files has my team uploaded to xAI\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"How many files to return (1 to 100).","title":"Limit"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction: asc or desc.","title":"Order"},"sort_by":{"anyOf":[{"enum":["created_at","filename","size"],"type":"string"},{"type":"null"}],"default":null,"description":"Field to sort by: created_at, filename or size (default created_at).","title":"Sort By"},"pagination_token":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Token from the previous answer's pagination_token to fetch the next page.","title":"Pagination Token"}},"title":"list_filesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_file_metadata":{"post":{"operationId":"get_file_metadata","summary":"Get one uploaded file's metadata (name, size, purpose, dates). Does not download the file content. Use for \"How big is x","description":"Get one uploaded file's metadata (name, size, purpose, dates). Does not download the file content. Use for \"How big is xAI file file_abc123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"file_id":{"description":"File id as returned by list_files.","maxLength":200,"title":"File Id","type":"string"}},"required":["file_id"],"title":"get_file_metadataArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_skills":{"post":{"operationId":"list_skills","summary":"List the skills in your xAI account with name, description and latest version. Page with after (the last_id of the previ","description":"List the skills in your xAI account with name, description and latest version. Page with after (the last_id of the previous answer). Use for \"What skills do I have in xAI\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"How many skills to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Skill id to start after, taken from the previous answer's last_id.","title":"After"}},"title":"list_skillsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}